Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Vfp -> sql server Insert cmd syntax error
Message
From
16/07/2004 10:48:14
 
 
To
09/07/2004 15:50:35
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00922683
Message ID:
00925172
Views:
22
I had to change your suggestion slightly to get it to pass correctly:

lcVal1 = "Walsh"
lcVal2 = "Elizabeth"
lcSQLstr = [INSERT INTO studnt (last_name_, firstname_, studnt_id_ )] + ;
[ VALUES (] + ?lcVal1 + [, ] + ?lcVal2 + [, 1)]
once I did that, the sqlexec gave me back an nice number 1 ;-).

Thanks for the help.
Beth

>The easiest way is to create parameters for the query

>lcVal1 = "Walsh"
>lcVal2 = "Elizabeth"
>lcSQLstr = 'INSERT INTO studnt (last_name_, firstname_, studnt_id_ )' + ;
> ' VALUES (?lcVal1, ?lcVal2, 1)'
>llReturnVal=SQLEXEC(ghConnectionhandle,lcSQLstr)

>Charles
Previous
Reply
Map
View

Click here to load this message in the networking platform