Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to use ? in variables for UPDATE/INSERT statements?
Message
De
26/06/2007 13:25:08
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 7
Divers
Thread ID:
01235643
Message ID:
01235742
Vues:
22
>>Hello Everyone..
>>
>>Listed below is a sample code to update a table by using SQL passthrough statement.
>>If someone keys in ? mark as part of the reference field, it causes a syntax error and program fails. Can someone guid me how to overcome this situation ?
>>
>>
>>*-- Sample code
>>cTemp.doc_numb = "0000212-00"
>>cTemp.doc_refr = "Gadgets Size ? "
>>
>>lcSQL = "INSERT INTO cDetail (doc_numb, doc_refr) +;
>> " VALUES(?cTemp.doc_numb, cTemp.doc_refr) "
>>=ExecuteSQL(lcSQL)
>>
>>
>>Thank you in advance...
>>
>>Raza Malik
>
>Hi Raza,
>The command line must be
>
>lcSQL = "INSERT INTO cDetail (doc_numb, doc_refr)" +;
>" VALUES(?cTemp.doc_numb, cTemp.doc_refr) "
>
Yes, typo corrected but ? should be added as well.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform