codecharge_user9
Posts: 7
|
| Posted: 03/08/2005, 1:55 PM |
|
Hi,
I have the following code in AfterExecuteInsert event.
dim sql_statement
sql_statement = "INSERT INTO [Issues](" & _
"[Title], " & _
"[Description], " & _
") VALUES (" & _
DBTest_DB_Connection.ToSQL(Issues.Title.value, ccsText) & ", " & _
DBTest_DB_Connection.ToSQL(Issues.Issue_Description.value, ccsMemo) & ", " & _
")"
DBTest_DB_Connection.Execute sql_statement
It works fine (i.e. inserting) when the memo field has a few text.
It does not work (i.e. does not insert anything) when the memo field has a very long text.
Please help!!!
Thanks
|
 |
 |
Oper
Posts: 1195
|
| Posted: 03/08/2005, 9:18 PM |
|
DOuble check if your Field "DESCRIPCION" was defined as a Memo field
_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)
http://www.PremiumWebTemplate.com
Affiliation Web Site Templates
Please do backup first |
 |
 |
peterr
Posts: 5971
|
| Posted: 03/09/2005, 1:46 AM |
|
I think that some databases and drivers cannot create memo fileds with just one Insert statement. Thus the answer may depend on your database and driver. You may want to refer to your database documentation and do testing outside of CCS.
CCS support may also provide some tips.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
GeorgeS
Posts: 206
|
| Posted: 03/09/2005, 8:26 AM |
|
Peter is correct.
For example, as I remember "memo" fields in Access require some special treatment:
1. SELECT * FROM myTable - is not recommended
instead use:
SELECT field1, field2, memoField FROM myTable - "memo" field MUST be the last one
2. sometimes SELECT returns an empty memo field if SELECT statement used more than once under the same Connection
3. to display Memo's content you MUST put it ino a variable first or empty result will be returned:
varMemoContent = rs("memoField")
response.write varMemoContent
In your case I'd try using INSERT without CCS functions in it just to see if it will fix the problem.
"INSERT INTO Issues ([Title], [Description]) VALUES ('" & Issues.Title.value & "', '" & Issues.Issue_Description.value &"')"
_________________
GeorgeS |
 |
 |
|