General information
Category:
Coding, syntax & commands
Hi all,
I am trying to create a sql statement to insert some value to my sample table in VFP.
lcSQLStatement='INSERT INTO tasklist (department,detail) ' + ;
'VALUES (CHR(34) + thisform.txtDept.Value + CHR(34)+ ',' + CHR(34) + thisform.edtDetail.value + CHR(34) + ')' && Detail is a memo field.
nConHandle = SQLConnect(DS_NAME_1, DSN_USER_ID, DSN_PASSWORD)
= SQLPREPARE(nConHandle, lcSQLStatement)
lnSQLExecute = SQLEXEC(nConHandle)
But the problem is if you have a carriage return line feed in the 'thisform.edtDetail' control the SQLEXEC does not work. I tried with replacing the carriage return and the line feed with some other special charactors then it worked fine. But when ever you want to display the content of that field I have to remember to change back the special char to carriage return and line feed char. Is there any other way to do this.
Really appreciated.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only