Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Passthrough
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
SQL Passthrough
Divers
Thread ID:
00915130
Message ID:
00915130
Vues:
58
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform