Hola, tengo este programa y no entiendo porque me da error el segundo insert:
#include "FiveWin.ch"
REQUEST HB_LANG_ES
function Main()
local oCn, oCnM, oRs, aStates
LOCAL lShowError := .t.
/*
dbcreate( ".\prudbt", { { "id" , "n", 8, 0 }, ;
{ "Cliente " , "n", 6, 0 }, ;
{ "Numero" , "n", 6, 0 }, ;
{ "Numero " , "n", 6, 0 }, ;
{ "Lider " , "n", 6, 0 }, ;
{ "Norma " , "n", 8, 0 }, ;
{ "apartado " , "c", 10, 0 }, ;
{ "Fecha " , "d", 8, 0 }, ;
{ "Hora " , "c", 5, 0 }, ;
{ "Proceso " , "c", 10, 0 }, ;
{ "Resultado" , "m", 10, 0 }, ;
{ "Interna " , "c", 1, 0 }, ;
{ "Finalizada " , "D", 8, 0 } ;
} )
clos data
*/
REQUEST DBFCDX
RDDSETDEFAULT( "DBFCDX" )
/*
dbcreate( ".\prueba", { { "id" , "n", 8, 0 }, ;
{ "Cliente " , "n", 6, 0 }, ;
{ "Numero" , "n", 6, 0 }, ;
{ "Numero " , "n", 6, 0 }, ;
{ "Lider " , "n", 6, 0 }, ;
{ "Norma " , "n", 8, 0 }, ;
{ "apartado " , "c", 10, 0 }, ;
{ "Fecha " , "d", 8, 0 }, ;
{ "Hora " , "c", 5, 0 }, ;
{ "Proceso " , "c", 10, 0 }, ;
{ "Resultado" , "m", 10, 0 }, ;
{ "Interna " , "c", 1, 0 }, ;
{ "Finalizada " , "D", 8, 0 } ;
} )
clos data
dbcloseall()
*/
oCn := FW_OpenAdoConnection( "c:\fwh2212\samples\" )
oCnM := FW_OpenAdoConnection( { "FOXPRO", "c:\fwh2212\samples\"}, .f. )
csql := "INSERT INTO .\prudbt (cliente,Numero) VALUES ( 0, 21) "
oCn:Execute( csql )
csql := "INSERT INTO .\prueba (cliente,Numero) VALUES ( 0, 21) "
oCnm:Execute( csql )
oRs:Close()
oCn:Close()
oCnm:Close()
return nil
me da error :
Args:
[ 1] = C INSERT INTO .\prueba (cliente,Numero) VALUES ( 0, 21)
Stack Calls
===========
Called from: => TOLEAUTO:EXECUTE( 0 )
Called from: abd4.prg => MAIN( 59 )