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.

FIX: MSDAORA Incorrectly Returns Padded Data for a CONSTANT CHAR(x) Field

View products that this article applies to.


When you use the Microsoft Oracle OLE DB Provider (MSDAORA) for Microsoft Data Access Components (MDAC) 2.6 and 2.7 to access an Oracle fixed-length CONSTANT CHAR field, you may find that the length of the string retrieved is far greater than expected. All of the additional characters are spaces.

For example, when you access a CONSTANT CHAR field of fixed length 1, the string retrieved is 32 bytes in length. The string contains the correct first character followed by 31 spaces.

Note that no error is returned when this "padding" occurs.

↑ Back to the top


To resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
290211 INF: How to Obtain the Latest SQL Server 2000 Service Pack
The English-language version of this fix should have the following file attributes or later:
   Date         Version       Size     File name      Platform
   08-Nov-2001  2.62.8108.0   225,552  Msdaora.dll    x86


You can work around the problem in either of the following ways:
  • Use RTrim while comparing the values of a CONSTANT CHAR(x) field or while checking its length.
  • Use a CONSTANT VARCHAR(x) field.

↑ Back to the top


Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This problem was first corrected in Microsoft SQL Server 2000 Service Pack 3.

↑ Back to the top

Keywords: KB312994, kbsqlserv2000presp3fix, kboracle, kbfix, kbbug, kbsqlserv2000sp3fix, kbqfe, kbhotfixserver

↑ Back to the top

Article Info
Article ID : 312994
Revision : 6
Created on : 9/26/2005
Published on : 9/26/2005
Exists online : False
Views : 347