Database is DB2/400 on V5R1, using Client Access on Windows 2000 via
It's a rather strange problem. Everything working fine, then I call
SQLExecDirect for a simple insert statement and receive the warning
SQL_SUCCESS_WITH_INFO, SQLSTATE=01000, message (from ODBC trace file)
something like "Changed locking level, *RR elevated to *EXCL" (this
isn't the exact message, I'm trying to remember it since I'm not at
work now). I believe the native SQL code number was 595.
Anyway, my code is set up to write all warnings and errors to a log
file, even relatively innocuous ones such as the above. Trouble is,
when I call SQLGetDiagRec, I continue to receive
SQL_SUCCESS_WITH_INFO, which -- according to the Microsoft docs -- is
supposed to mean "message string buffer too small". But my buffer is
initially allocated for 512 bytes, and I receive a total byte count of
only 113, so obviously no truncation has taken place. Nevertheless, no
message is returned.
How can I retrieve the text of the warning in every case?
SQLGetDiagField doesn't work, either; when I query the number of error
rows I receive only 1. The ODBC trace DLL seems to be able to get it
OK ... presumably, it also calls the same ODBC functions I would have
to, only which one(s)?
Anyone else ever encounter this?