I have been successful with connecting with commands from VFP6.0 into SQL 7 with a select statement, and retriving the correct data. The connection handles are correct
and the following is an example of that.
hdlPLINE = sqlconnect("fox2sql","sa",""
sSQL = "select d_customer,d_lineno,d_departm,d_user from tblAMC2 where d_customer='SUN'"
*-----SQLPrepare( nConnectionHandle,cCommand,cResultCursor )
sqlprepare(hdlPLINE,sSQL,"sqlPLINE"
rval= sqlexec(hdlPLINE)
However, I cannot come up with the correct syntax for INSERT or UPDATE, and the SQLRESULT is always -1. I have tried diffent examples found in publications including the method described in ADVISOR APRIL 2001, in Grow Solutions with MSDE. That command will not work.
Any help will be appreciated.
and the following is an example of that.
hdlPLINE = sqlconnect("fox2sql","sa",""
sSQL = "select d_customer,d_lineno,d_departm,d_user from tblAMC2 where d_customer='SUN'"
*-----SQLPrepare( nConnectionHandle,cCommand,cResultCursor )
sqlprepare(hdlPLINE,sSQL,"sqlPLINE"
rval= sqlexec(hdlPLINE)
However, I cannot come up with the correct syntax for INSERT or UPDATE, and the SQLRESULT is always -1. I have tried diffent examples found in publications including the method described in ADVISOR APRIL 2001, in Grow Solutions with MSDE. That command will not work.
Any help will be appreciated.