Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement