Re: dynamic sql EXEC SQL EXECUTE "Arti Potnis" <artpot78@yahoo.com> wrote in message
news:ece8ea46.0406100508.5ec8b99f@posting.google.c om...
> I have some problems with dynamic SQL statements in DB2
>
> in a c file we have the following statements in sequence:-
>
> 1)EXEC SQL DECLARE my_stmt STATEMENT ;
> 2)EXEC SQL PREPARE my_stmt FROM :SQL_STMT;
>
> here the variable SQL_STMT contains " INSERT INTO MY_INS_TABLE (
> CUSTOMER_ID
> ,CREATEDATE,LASTUPDATEDATE , NAME) (SELECT :v1, current date, current
> date,NAME from MY_LOAD_TABLE where FSI=:fsi and FCI=:fci)"
>
> 3)EXEC SQL EXECUTE my_stmt
> using :CUST_ID ,:fsi ,:fci;
>
> the SQL_ERROR= -727 and error message is in an encrypted format.
>
> SQLERRM: 2ÿ-418ÿ42610ÿ
> SQLERRCODE:-727
>
> Is there any way to decrypt an encrypted message thrown by DB2.
> OR is there any known problem using Dynamic SQL Statements (with bind
> variables) along with 'EXEC SQL EXECUTE' in DB2.
Did you check out the Messages and Codes manual? All manuals can be
downloaded from the IBM website in PDF format. The SQLERRCODE messages are
in volume 2. |