SQL - SQLCODE's - Códigos negativos -227


Volta a página anterior

Volta ao Menu Principal


Desenvolvido por DORNELLES Carlos Alberto - Analista de Sistemas - Brasília DF. - cad_cobol@hotmail.com

SQLCode -227

   
 
  • Causa
    • FETCH fetch-orientation IS NOT ALLOWED, BECAUSE CURSOR cursor-name HAS AN UNKNOWN POSITION (sqlcode,sqlstate).

      The cursor position for cursor-name is unknown.
      The previous multiple-row FETCH for cursor cursor-name resulted in an error (SQLCODE sqlcode, SQLSTATE sqlstate) in the middle of processing multiple rows that were retrieved from Db2.
      One or more of the requested rows could not be returned to the program following the error, leaving the position of the cursor unknown.

      If an indicator structure had been provided on the previous multiple-row FETCH, a positive SQLCODE would have been returned and all of the rows that were retrieved from Db2 could have been returned to the application program.
  • Ação do sistema
    • The statement cannot be processed.
      The cursor position is not changed.
  • Resposta ao Desenvolvedor
    • Close and reopen the cursor to reset the position.
      For scrollable cursors, you can change the FETCH statement to specify one of the other fetch orientations (such as FIRST, LAST, BEFORE, AFTER, or ABSOLUTE) to establish a valid cursor position and fetch a row of data.

      SQLSTATE: 24513

© Copyright IBM Corp.