FIX: MSDAORA Incorrectly Returns Padded Data for a CONSTANT CHAR(x) Field (312994)
The information in this article applies to:
- Microsoft Data Access Components 2.6
- Microsoft Data Access Components 2.6 SP1
- Microsoft Data Access Components 2.6 SP2
- Microsoft Data Access Components 2.7
- Microsoft OLE DB Provider for Oracle 2.7
- Microsoft OLE DB Provider for Oracle 2.6
This article was previously published under Q312994 SYMPTOMS
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.
RESOLUTION 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
WORKAROUND
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.
STATUSMicrosoft 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.
Modification Type: | Minor | Last Reviewed: | 9/26/2005 |
---|
Keywords: | kbHotfixServer kbQFE kbSQLServ2000sp3fix kbbug kbfix kbOracle kbSQLServ2000preSP3fix KB312994 |
---|
|