Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL - Insert statement
Message
 
To
28/03/2001 16:36:01
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00489646
Message ID:
00489650
Views:
8
Try this
x=sqlconnect( 'yourconnection' )
if x > 0
   cPK = '123'
   cNAME = 'john doe'
   ? sqlexec( x, "INSERT YourTable( YourPK, SampleField ) VALUES( &cPK, &cNAME ) " )
endif

sqldisconnect( x )
>I have a bunch of variables that i need to insert into a sql table. Is it possible, and if so what is the exact syntax, to use SQLEXEC() and an INSERT statement to put FoxPro variables into a SQL table. I know that working solely with SQL dml syntax you can declare and use variables via the @ character but I'm stuck as to how to use VF variables within the SQLEXEC() statement.
Hector Correa
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform