Hi Eric,
Great!
Every database has its SQLCODEs and meanings. Some SQLCODEs and meanings may match, but perhaps others may not. I will attach the DB2 Messages Codes and look for the meaning of the SQLCODE error. perhaps you cound find in google the sqlcode to another database manager
ex.
+100 ROW NOT FOUND FOR FETCH,
UPDATE OR DELETE, OR THE
RESULT OF A QUERY IS AN EMPTY
TABLE
Explanation: One of the following conditions
occurred:
v No row met the search conditions specified in an
UPDATE or DELETE statement.
v The result of a SELECT INTO statement was an
empty table.
v The result of the subselect of an INSERT statement is
empty.
v A FETCH statement was executed when the cursor
was positioned after the last row of the result table.
When a SELECT statement is executed using SPUFI,
this SQLCODE indicates normal completion.
This SQLCODE is also issued when LOB data cannot
be returned. This situation can occur when an
application is running with isolation level UR and
another application has locked the LOB table space.
System action: No data was retrieved, updated, or
deleted.
SQLSTATE: 02000
I hope help you.
regards,
Hsieh
------------------------------
Hsieh YUAN
------------------------------
Original Message:
Sent: Wed January 26, 2022 01:21 PM
From: Eric Zuo
Subject: Values of sqlLib.sqlData.sqlcode
Hi Hsieh,
I write out the values with sysVar.sqlData and sqlLib.sqlData:
sysLib.writeStdout (" sysVar.sqlData.sqlcode :" + sysVar.sqlData.sqlcode ); ---> 100
sysLib.writeStdout (" sysVar.sqlData.sqlerrmc: " + sysVar.sqlData.sqlerrmc); ---> No output:
sysLib.writeStdout (" sqlLib.sqlData.sqlcode: " + sqlLib.sqlData.sqlcode ); ---> 100
sysLib.writeStdout (" sqlLib.sqlData.sqlerrmc : " + sqlLib.sqlData.sqlerrmc ); ---> No output
therefore I cannot get meaningful information on it.
Hope experts could forward instruction.
Thanks,
Eric
------------------------------
Eric Zuo
Original Message:
Sent: Tue January 25, 2022 12:30 PM
From: Hsieh YUAN
Subject: Values of sqlLib.sqlData.sqlcode
Eric,
When you use DB2 data base there are the specific return sqlcode and message to this one.
And if is another data base then you got a return sqlcode and message to this one.
Then if you are third party to anyone data base is better to use sqllib.sqlData.sqlstate.
Anyway you will need to build your own exceptions for each type return code from the vendor database.
Regards,
Hsieh
------------------------------
Hsieh YUAN
Original Message:
Sent: Tue January 25, 2022 12:00 PM
From: Eric Zuo
Subject: Values of sqlLib.sqlData.sqlcode
Hi Hsieh ,
It is Oracle.
Actually my case is more complicated. Our application is developed by third party company, using their unique customized environment/lib without left any document. In the program, it is called sysvar.sqlData.sqlcode, I guess it probably corresponds to EGL sqlLib.sqlData.sqlcode, I wonder the value might be customized away either.
Thanks,
Eric
------------------------------
Eric Zuo
Original Message:
Sent: Tue January 25, 2022 04:27 AM
From: Hsieh YUAN
Subject: Values of sqlLib.sqlData.sqlcode
Hi Eric,
It's depending which database are connected. which database are you used ?
Hsieh
------------------------------
Hsieh YUAN
Original Message:
Sent: Mon January 24, 2022 06:30 PM
From: Eric Zuo
Subject: Values of sqlLib.sqlData.sqlcode
Dear Export,
sqlLib.sqlData.sqlcode has values: 0, 1,...
What is the meaning of the values?
Please help, thanks you,
Eric
------------------------------
Eric Zuo
------------------------------