General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Crescencio, I tried the code that you sent me.
Here is the code:
************************************************************************
*-- jeinterface is a VFP table with a field called
*-- batch_skey wich is character type.
IF !USED('jeinterface')
USE jeinterface IN 0
SELECT jeinterface
ELSE
SELECT jeinterface
ENDIF
GO TOP
*-- Create connection to SQL server
nHan = SqlConnect("jeinterface")
IF ( nHan = -1 )
WAIT WINDOW 'failure of Connect'
ENDIF
SCAN
lcBatchSkey =jeinterface.batch_skey
nRes = SQLExec(nHan, "INSERT INTO jeinterface (batch_skey);
Values('THIS IS A TEST') ")
IF ( nRes = -1 )
WAIT WINDOW 'failure of SQLExec' NOWAIT
ENDIF
ENDSCAN
***************************************************************************
The code above works fine but when I try to do the following :
***************************************************************************
lcBatchSkey =jeinterface.batch_skey
nRes = SQLExec(nHan, "INSERT INTO jeinterface (batch_skey);
Values(lcBatchSkey) ")
****************************************************************************
The above insert does not work. So the question is how can I insert values from the jeinterface visual foxpro table to the SQL server table.
Any clue of what might be the problem.
Thanks,
Sergio
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only