SQL FUNCTIONS
Posted: Thu Dec 14, 2017 4:11 pm
Nages,
fantastic job, congratulations !!!
Please:
Why can not I compile this simple example using the SQL functions?
I use the Buildx.bat of FW 1608
Thank you
fantastic job, congratulations !!!
Please:
Why can not I compile this simple example using the SQL functions?
Returns Syntax error => "Error E0030 Syntax error: 'syntax error at" TRANSACTION "'"oQry = oServer:Query( "SELECT * FROM nombres" )
oQry:GoBottom()
BEGIN TRANSACTION
cCmdSql:= "INSERT INTO nombres ( "
cCmdSql += "nombre" + ","
cCmdSql += "apellido1" + ","
cCmdSql += "apellido2" + ","
cCmdSql += "direccion" + ","
cCmdSql += "edad" + ","
cCmdSql += "poblacion" + ","
cCmdSql += "provincia )"
cCmdSql += "VALUES("
cCmdSql += "'"+cNombre+"'" +","
cCmdSql += "'"+cApellido1+"'" +","
cCmdSql += "'"+cApellido2+"'" +","
cCmdSql += "'"+cDireccion+"'" +","
cCmdSql += ""+str(cEdad)+"" +","
cCmdSql += "'"+cPoblacion+"'" +","
cCmdSql += "'"+cProvincia+"' )"
oServer:Execute( cCmdSql )
IF oServer:nError = 0
COMMIT()
BEEP()
MSGRUN(OemToAnsi("Registros inclusos com Sucesso..."),OemToAnsi("ATENۂO..."))
ELSE
ROLLBACK()
BEEP()
MSGRUN(OemToAnsi("Nao foi possivel Incluir os Registros..."),OemToAnsi("ATENۂO..."))
oServer:ShowError()
ENDIF
END TRANSACTION
oServer:End()
I use the Buildx.bat of FW 1608
Thank you