Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert memo text
Message
 
 
To
07/03/2008 12:52:26
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01299781
Message ID:
01299802
Views:
9
>Thanks Naomi. Did you look at my cade sequence at the bottom? This is just in testing and the memotxt is pretty simple, just a couple of words on 2 lines. Not sure what you meant by using parameters.

Instead of using a string as you currently do, you need to research on adding parameters to the command object. I believe Cetin showed it to you few times, I may try to search here.

We're using similar concept in ASP.NET.

>
>>The plain insert should not crash with CRLF. Needs a better investigation here.
>>
>>Instead of string concatenation, can you use parameters? Then you would not have this problem.
>>
>>>When using the SQL INSERT command, how do you "clean" a memo field if there are carriage returns in the memo text?
>>>
>>>
>>>insert into mytable (memofield) values (memotext)
>>>
>>>
>>>I am running this from an ASP page and it crashes if there are CRLF in the memotext.
>>>
>>>execstr = "EXEC 'insert into memos (link_table,record_id,memo_name,memo_text,added_by)"
>>>execstr = execstr & " values ([people],"
>>>execstr = execstr & lcPerson_id & ","
>>>execstr = execstr & "[notes],"
>>>execstr = execstr & "[" & request.form("txtNotes") & "],"
>>>execstr = execstr & "[" & session("FullUserName") & "])'"
>>>response.write(execstr)
>>>oConn.EXECUTE(execstr)
>>>
>>>
>>>Thanks
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform