Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

DUMPu00B4s with SQL

Former Member
0 Likes
641

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
600

It appears that you are trying to insert a non-numeric into a numeric field.

Rob

4 REPLIES 4
Read only

Former Member
0 Likes
601

It appears that you are trying to insert a non-numeric into a numeric field.

Rob

Read only

Former Member
0 Likes
600

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.

Read only

Former Member
0 Likes
600

Hi,

I feel, it's not accepting the date format, just check-out with 'SYSDATE'.

regards

Mahesh

Read only

Former Member
0 Likes
600

Ready