CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Custom "SQL Insert" does not insert if Memo field is too long

Print topic Send  topic

Author Message
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
View profile  Send private message
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
View profile  Send private message
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
View profile  Send private message
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
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.