DB2 SQL Errors Codes and Error Messages and Warnings from Error -579 to -581

SQLServerF1

Error: DB2 SQL Error: SQLCODE=-585, SQLSTATE=42732, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
THE COLLECTION collection-id
APPEARS MORE THAN ONCE IN THE
SET special-register STATEMENT

Error: DB2 SQL Error: SQLCODE=-586, SQLSTATE=42907, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=

THE TOTAL LENGTH OF THE
CURRENT PATH SPECIAL REGISTER
CANNOT EXCEED 2048 CHARACTERS

Error: DB2 SQL Error: SQLCODE=-589, SQLSTATE=24520, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=

A POSITIONED DELETE OR UPDATE
STATEMENT FOR CURSOR cursor-name
SPECIFIED A ROW OF A ROWSET,
BUT THE CURSOR IS NOT
POSITIONED ON A ROWSET
Explanation: The FOR ROW n OF ROWSET clause
was specified on a positioned DELETE or UPDATE
statement, but the cursor is not currently positioned on
a rowset.
System action: The statement cannot be processed.
Programmer response: Issue a FETCH statement to
position the cursor on the desired rowset, and then
reissue the positioned DELETE or UPDATE statement.
If the cursor is not defined for rowset access, redefine
the cursor first.
SQLSTATE: 24520

Above are list of DB2 SQL Errors and Warnings from Error -585 to -589 received while performing certain operation against DB2 Database or related products.

SQLCODE – Regardless of whether the application program provides an SQLCA or a stand-alone variable, SQLCODE is set by DB2 after each SQL statement is
executed. DB2 conforms to the ISO/ANSI SQL standard as follows:
If SQLCODE = 0, execution was successful.
If SQLCODE > 0, execution was successful with a warning.
If SQLCODE < 0, execution was not successful.
SQLCODE = 100, “no data” was found. For example, a FETCH statement returned no data because the cursor was positioned after the last row of the result table.

SQLSTATE – SQLSTATE is also set by DB2 after the execution of each SQL statement. Thus, application programs can check the execution of SQL statements by testing SQLSTATE instead of SQLCODE.

Hope this was helpful.

Thanks,
SQLServerF1 Team
Information about DB2 SQL Error Codes and Error Messages on Windows, Linux and Z/OS Operating Systems.

 

Leave a Reply

Your email address will not be published. Required fields are marked *