Question : odbc problem (sqlexec, sqlconnect)

i want to insert information in my odbc table. What's wrong with this code?



STORE SQLCONNECT('MSSQL_VAM') TO MyConnection
SQLSETPROP(MyConnection, 'Transactions', 2)
STORE SQLEXEC(MyConnection, "INSERT INTO reception (transport) VALUES (v_transport)") to test
SQLCOMMIT(MyConnection)
if test<0 then
  messagebox("yes")
else
  messagebox("no")
endif
 

Answer : odbc problem (sqlexec, sqlconnect)

Hi Galika_VS,


You can add this:
STORE SQLEXEC(MyConnection, "INSERT INTO reception (transport) VALUES (?v_transport)") to test

There is "?" before v_transport in the line STORE SQLEXEC ...

So before this line, you need to add
v_transport = your_value_here

Hope this helps.

SF


Random Solutions  
 
programming4us programming4us