DB2 - Problem description
Problem IC90721 | Status: Closed |
SQLGETDIAGFIELDW() RETURNS THE STRINGLENGTHPTR AS CHARACTERS INSTEAD OF BYTES. | |
product: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problem description: | |
The SQLGetDiagFieldW() API was changed in APAR# IC85013 (available in DB2 Version 9.7 FP7) so that the StringLengthPtr returns the number of characters in the buffer instead of the number of bytes. The ODBC specifications require that StringLengthPtr for SQLGetDiagFieldW returns the number of bytes. This APAR reverts the changes that were made in APAR# IC85013. The DB2 documentation has been updated to indicate that this field returns the number of bytes. The updated documentation can be found at the following link: http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/com.i bm.db2.luw.apdv.cli.doc/doc/r0000608.html Without the fix for this APAR, an ODBC application can abend. When an ODBC application abends, it might produce a stack that looks like the following: 0012eb44 743269cd msvcrt!wcscpy+0xe 0012f0cc 7432591c odbc32!VRetrieveDriverErrorsRowCol+0x3cd 0012f120 743230de odbc32!FinishConnection+0x28 0012f148 74322ad7 odbc32!SQLInternalDriverConnectW+0x268 0012f8a4 74353111 odbc32!SQLDriverConnectW+0xb89 0012f8dc 004011f1 odbc32!SQLDriverConnect+0x125 0012fe1c 004010de dbconn!DbDriverConnect+0xe1 0012ff78 004017a5 dbconn!main+0xbe 0012ffc0 7c81776f dbconn!__tmainCRTStartup+0x10b 0012fff0 00000000 kernel32!BaseProcessStart+0x23 | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * All users using ODBC * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 version 9.7.0.8. * **************************************************************** | |
Local Fix: | |
Use the SQLErrorW() instead of SQLGetDiagFieldW() API. | |
available fix packs: | |
DB2 Version 9.7 Fix Pack 8 for Linux, UNIX, and Windows | |
Solution | |
The problem is first fixed in DB2 version 9.7.0.8. | |
Workaround | |
not known / see Local fix | |
BUG-Tracking | |
forerunner : APAR is sysrouted TO one or more of the following: IC92616 follow-up : | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 08.03.2013 25.03.2013 26.03.2013 |
Problem solved at the following versions (IBM BugInfos) | |
9.7.0.8 | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.7.0.8 |