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 15:47:35
Raza Malik
Universal Accounting Software
Edgewater, New Jersey, États-Unis
 
 
À
26/06/2007 09:55:19
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:
01235836
Vues:
31
Hi Cetin...

In the previous example, the ? was a type which I forgot to add. Let me give you
another example listed below:

*--
lnUnt_ship = 10
lcOrd_numb = '1234'
lcItem_numb = 'TEST"
lcItm_desc = "Brackets [1/2)"

lcSQL = "UPDATE cOrders SET " + ;
"unt_ship = unt_ship + " + TRANSFORM(lnUnt_ship) + ", " +;
"WHERE ord_numb = [" + lcOrd_numb + "] AND itm_numb = [" + lcItm_numb + "] "
=SQLEXEC(gnC, lcSQL)
*--

In the example above, the brackets in the lcItm_desc breakes the statement and causes a syntax error. How can I avoid this...

Thank you again
Raz
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform