home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Latest versionsfixlist
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

DB2 - Problem description

Problem IC92616 Status: Closed

SQLGETDIAGFIELDW() RETURNS THE STRINGLENGTHPTR AS CHARACTERS INSTEAD OF
BYTES.

product:
DB2 FOR LUW / DB2FORLUW / A10 - 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 10.1.0.3.                             * 
****************************************************************
Local Fix:
Use the SQLErrorW() instead of SQLGetDiagFieldW() API.
available fix packs:
DB2 Version 10.1 Fix Pack 3 for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 4 for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 3a for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 6 for Linux, UNIX, and Windows

Solution
The problem is first fixed in DB2 version 10.1.0.3.
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
27.05.2013
01.10.2013
01.10.2013
Problem solved at the following versions (IBM BugInfos)
Problem solved according to the fixlist(s) of the following version(s)
10.1.0.3 FixList
10.1.0.3 FixList