We are embedding SQL into COBOL programs using UNIX ODBC version 2.2.5. The following 
code works until we do the update statement. On the UPDATE statement we receive -4000: 
Unknown result table. Is the syntax incorrect or is it incorrect use of "where current 
of" statement? Please advise.

                                                        Thanks,
                                                                David


      EXEC SQL
         DECLARE cur1 CURSOR FOR select col_, col_02
         from test_table
       END-EXEC.
       display 'declare ' SQLCODE ' ' mfsqlmessagetext.

       EXEC SQL
         OPEN cur1
       END-EXEC.

       display 'open ' SQLCODE ' ' mfsqlmessagetext.

       EXEC SQL
         fetch cur1 into :var1, :var2
       END-EXEC.
       display 'var1: ' var1, 'var2: ' var2

       display 'fetch ' SQLCODE ' ' mfsqlmessagetext.

       EXEC SQL
         update test_table
         set col_02 = 'XZCVWE11111111'
         where current of cur1
      END-EXEC.
--------
error message from output:
    
UPDATE -0000004000 [unixODBC][SAP AG][LIBSQLOD SO][SAP DB]General error;-4000 POS(66)  
                              
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to