Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inserting records to SQL Server
Message
From
31/10/2001 16:19:51
 
 
To
31/10/2001 16:10:18
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00574760
Message ID:
00575879
Views:
27
>Crescencio, I am not using SQLPrepare().
>
>Sergio

Try doing a concatenation of the values like so:
.. VALUES ( " + TransForm(BatchSkey) + ",";
  + "'" + CoCode + "',";
  + Transform(UsrBatchId) + "," &&.. etc.
Note that for numeric values you have to Transform() to character and for string and date values you have to enclose it within single quotes. The final result should look like:
.. VALUES(1, '001', 3, '2001-10-31')
It might help debugging this if you first construct the statement in a variable and then give it to SqlExec() like so: SqlExec(nHan, lcStatement).
Previous
Reply
Map
View

Click here to load this message in the networking platform