Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Insert on DB2 linked table fails with "Invalid precision" error


View products that this article applies to.

Symptoms

When you are using the Host Integration Server 2000 ODBC Provider for DB2, if you try to use a linked DB2 table on an OS/390 Mainframe system from Microsoft Access, you may receive the following error:
ODBC--insert on a linked table 'MY_CODES' failed [Microsoft][ODBC DB2 Driver] Invalid precision or scale value. (#0)

↑ Back to the top


Cause

The Host Integration Server 2000 ODBC Provider for DB2 limits the maximum length for a CHAR data type to 254 decimal. However, Mainframe systems have a higher limit on the CHAR data type of 255 decimal.

The result is that, although you can specify or try to access a CHAR field in a DB2 table that has a length of 255, you receive an error message.

The following table definition demonstrates the problem if you reference the "Text" field:
CREATE TABLE MY.Codes
(Art        CHAR (11) NOT NULL ,
 Text       CHAR (255) ,
 Group      CHAR (16),
 Beding     SMALLINT
 ) IN MYRDB.MYCOL ;
				
NOTE: The "Text" field is defined with a value of 255.

↑ Back to the top


Resolution

Service pack information

To resolve this problem, obtain the latest service pack for Microsoft Host Integration Server 2000. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
328152 How to obtain the latest service pack for Host Integration Server 2000

Hotfix information

The English version of this hotfix has the file attributes (or later file attributes) 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
   --------------------------------------------------------
   04-Oct-2002  20:10  5.0.0.900    311,568  Crtpkg.dll       
   04-Oct-2002  20:10  5.0.0.900    663,824  Db2oledb.dll     
   04-Oct-2002  20:10  5.0.0.900     78,096  Mseidb2c.dll     
   04-Oct-2002  20:10  5.0.0.900    880,912  Mseidb2d.dll     
   04-Oct-2002  20:10  5.0.0.900     24,848  Mseidpm.dll      
   04-Oct-2002  20:10  5.0.0.900    262,416  Mseidrda.dll     
   04-Oct-2002  20:10  5.0.0.900    147,728  Mseidt.dll       
   04-Oct-2002  20:10  5.0.0.900     65,808  Crtpkg.exe       
   01-Oct-2002  12:17  5.0.0.900     82,192  Ddmserv.exe   

				
Note Because of file dependencies, the most recent fix that contains the preceding files may also contain additional files.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in Host Integration Server 2000 Service Pack 1.

This problem was corrected in Microsoft Host Integration Server 2000 Service Pack 2.

↑ Back to the top


Keywords: KB329252, kbhotfixserver, kbqfe, kbfix, kbbug

↑ Back to the top

Article Info
Article ID : 329252
Revision : 3
Created on : 9/27/2005
Published on : 9/27/2005
Exists online : False
Views : 376