Hello,

I wrote the dbproc as follows. I can create it and call it without any 
error message, but it dous not insert any data into the table. Could you 
tell me what is wrong in the proc.

thank you advance,
Norbert

the proc:

CREATE DBPROC DATA_UJ (
        IN TABLEIDX             varchar(4),
        IN HEADERID             integer,
        IN PARAMID              integer,
        IN ERTEK                varchar(100)
        )
        RETURNS CURSOR AS
        VAR DID integer; IQ varchar(500);
        $CURSOR = 'DATA_CUR';
        TRY
                SELECT SEQ_DATAID.NEXTVAL FROM DBA.DUAL;
                FETCH INTO :DID;
                SET IQ = 'INSERT INTO DNUSER.DATA' || TABLEIDX ||
                '( DATAID, HEADERID, PARAMID, ERTEK )' ||
                'VALUES( ' || DID || ', ' || HEADERID ||', '|| PARAMID 
||', '''|| ERTEK || ''')';
                EXECUTE IQ;
                DECLARE :$CURSOR CURSOR FOR
                        SELECT :DID AS RES FROM DBA.DUAL;
        CATCH
                IF( $RC <> 0 )
                THEN STOP ( $RC, $ERRMSG );



-- 
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to