Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Passthru
Message
 
À
08/11/2002 02:09:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Divers
Thread ID:
00719981
Message ID:
00720370
Vues:
24
Thanks, I normally use that technique, but in this case some of the fields may contain single quotes within themselves and I can't strip them out because another application that uses this data relies on them. Also, some of the fields are memos and could be quite long.

I also tried the technique of making a cursor updatable, but many of the fields do not update for some reason.

>>>sqlexec(iCH, "insert into table (field1,field2) values (?oRec.field1, ?oRec.Field2)")
>
>You are sending a string to SQL Server that includes references to an object that exists only in your application. Try:
>
>
>cSql = "Insert into table(field1, fields2) values ("
>cSql = cSql + "'" + oRec.Field1 + "', "  && Field 1 contains a string, needs single quotes
>cSql = cSql + STR(oRec.Field2,5,0) + ")"  && Field 2 contains a number, but we are creating a string here
>SQLEXEC(iCH,cSql)
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform