‎2008 Oct 09 10:31 PM
Hi
I 'm using SQL sentences in a customer program, for example:
EXEC SQL.
INSERT INTO ORAGNI.V_SALDOS_FATPO@INT
VALUES (:TI_SALIDA-PERNR,
:TI_SALIDA-NAME1,
TO_DATE(:C_FECHA, 'dd.mm.yyyy'),
:TI_SALIDA-DISPO,
:TI_SALIDA-SALDOP,
:TI_SALIDA-SALDOAU,
:TI_SALIDA-SALDOAO,
:TI_SALIDA-SALDOAPO,
:TI_SALIDA-SALDOAE,
:TI_SALIDA-SALDOAD,
:TI_SALIDA-DARMC,
:TI_SALIDA-SALDOT,
* :TI_SALIDA-SYSID,
:V_FONDO,
:TI_SALIDA-ULTIMO_DIV)
ENDEXEC.
EXEC SQL.
COMMIT WORK.
ENDEXEC.
But i have a dump when I run this program, this is part of the dump:
Errores tiempo ejecucióDBIF_DSQL2_SQL_ERROR
ocurrido el 07.10.2008 a 14:59:31
------------------------------------------------------------------------------------------
SQL error 1722 occurred when executing EXEC SQL.
-----------------¿Qué ha sucedido?
-----------------
The error occurred in the current database connection "DEFAULT".
Other Dump:
Errores tiempo ejecucióDBIF_DSQL2_SQL_ERROR
ocurrido el 07.10.2008 a 14:59:31
------------------------------------------------------------------------------------------
SQL error 1722 occurred when executing EXEC SQL.
-----------------¿Qué ha sucedido?
-----------------
The error occurred in the current database connection "DEFAULT".
How can i do to catch this mistake ?? maybe i can to use catch ... endcatch ¿how can i use it?
Regards
Gregory
‎2008 Oct 09 10:38 PM
It appears that you are trying to insert a non-numeric into a numeric field.
Rob
‎2008 Oct 09 10:38 PM
It appears that you are trying to insert a non-numeric into a numeric field.
Rob
‎2008 Oct 10 3:49 AM
for example.
if PERNR of legacy field is integer and TI_SALIDA-PERNR field is numeric, this program is error.
you have to change legacy field... CHAR or VARCHAR.
‎2008 Oct 10 6:31 AM
Hi,
I feel, it's not accepting the date format, just check-out with 'SYSDATE'.
regards
Mahesh
‎2008 Oct 13 2:46 PM