Article ID: 326817
Article Last Modified on 3/25/2005
APPLIES TO
- Microsoft Host Integration Server 2000 Standard Edition
This article was previously published under Q326817
SYMPTOMS
When you try to select DB2 tables that contain fields that are specified as SMALLINT, you may receive the following error message:
This behavior occurs only if you are using the ODBC Driver for DB2 that comes with Host Integration Server 2000 (HIS). SNA Server 4.0 does not experience this problem.
CAUSE
When an application calls the ODBC SQLGetData function, the ODBC Driver for DB2 incorrectly returns a 4-byte value for the data type SMALLINT. The SMALLINT data type should return a 2-byte value.
RESOLUTION
Host Integration Server 2000
To resolve this problem, obtain the latest service pack for Host Integration Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
328152 How to Obtain the Latest Host Integration Server 2000 Service Pack
The English version of this fix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
Date Time Version Size File name --------------------------------------------------------- 18-Mar-2002 23:19 5.0.0.836 876,816 Mseidb2d.dll
NOTE: Because of file dependencies, the most recent fix that contains the preceding files may also contain additional files.
STATUS
Microsoft has confirmed that this is a problem in Host Integration Server 2000. This problem was first corrected in Host Integration Server 2000 Service Pack 1.
MORE INFORMATION
This error occurs when the underlying Jet engine tries to retrieve information about the indexes of the table by using SQLStatistics, and then later tries to retrieve the data in a field by using SQLGetData.
A field definition may be the following: Name: Type Size: Smallint
The following is the result of calling SQLGetdata in the ODBC Test application (ODBCTE32.EXE in the Microsoft ODBC Software Development Kit (SDK)):
In: Statementhandle = 0x009D1BF0, ColumnNumber = 7, TargetType = SQL_C_DEFAULT=99, TargetValuePtr = 0x001552B0, BufferLength = 12, StrLen_or_IndPtr = 0x00172E88 Return: SQL_SUCCESS=0 Out:*TargetValuePtr = 0x03000000, *StrLen_or_IndPtr = 4
The Length of the SMALLINT data type is incorrectly returned as a 4-byte value; the value of Length should be only 2 bytes.
Additional query words: 7743 ODBC SQLGetData DB2 HIS 2000
Keywords: kbbug kbfix kbhostintegserv2000sp1fix kbhostintegserv2000presp1fix kbhis2000bug KB326817