Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to use ? in variables for UPDATE/INSERT statements?
Message
From
26/06/2007 15:47:35
Raza Malik
Universal Accounting Software
Edgewater, New Jersey, United States
 
 
To
26/06/2007 09:55:19
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7
Miscellaneous
Thread ID:
01235643
Message ID:
01235836
Views:
32
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform