Client Access on W2K: ODBC errors and SQL_SUCCESS_WITH_INFO

Client Access on W2K: ODBC errors and SQL_SUCCESS_WITH_INFO

Post by Bob Hairgro » Fri, 24 Jan 2003 04:48:27



Hello,

Database is DB2/400 on V5R1, using Client Access on Windows 2000 via
ODBC.

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?

Bob Hairgrove

 
 
 

Client Access on W2K: ODBC errors and SQL_SUCCESS_WITH_INFO

Post by pm3iinc-nospa » Fri, 24 Jan 2003 13:40:29


isolation levels are
nc
ur
cs
rs
rr

What isolation do you use when you start?
On certain platforms, db2 doesn't support the NC isolation (no commit) for
example.

Verify that the message is a warning vs an error.
You may receive a message similar to "if the isolation level isn't supported
on the server, it will be changed to a higher one."
Maybe there are informative messages that tells you 'from what to what'
isolation level the transaction is upgraded to.

Doesnt' odbc have a trace switch you can set in the driver's setup?

PM

 
 
 

Client Access on W2K: ODBC errors and SQL_SUCCESS_WITH_INFO

Post by Kent Milliga » Fri, 24 Jan 2003 23:39:28


I'd also make sure the latest Database Group PTF & CA Fixpacks are installed on
your system.

--
Kent Milligan, DB2 & BI team
PartnerWorld for Developers, iSeries

Quote:>>> www.iseries.ibm.com/db2

(opinions stated are not necessarily those of my employer)
 
 
 

Client Access on W2K: ODBC errors and SQL_SUCCESS_WITH_INFO

Post by Kent Milliga » Fri, 24 Jan 2003 23:38:57


If you are using packages (extended dynamic) with the ODBC connection, you may
want to try deleting your packages and having client access recreate them

I would also suggest not using the RR/Serializable isolation level.  I doubt
that's causing your functional problems, but as you see from the message it
acquires an exclusive table lock.  If this application is designed for a single
concurrent user, then exclusive table locks will not be problem but if there's
more than one user this application will not work very well with this isolation
level.

--
Kent Milligan, DB2 & BI team
PartnerWorld for Developers, iSeries

Quote:>>> www.iseries.ibm.com/db2

(opinions stated are not necessarily those of my employer)