Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 312994 - Last Review: September 26, 2005 - Revision: 4.2
FIX: MSDAORA Incorrectly Returns Padded Data for a CONSTANT CHAR(x) Field
This article was previously published under Q312994
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.
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Â
(http://kbalertz.com/Feedback.aspx?kbNumber=290211/EN-US/
)
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.
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.
APPLIES TO
- Microsoft Data Access Components 2.6
- Microsoft Data Access Components 2.6 Service Pack 1
- Microsoft Data Access Components 2.6 Service Pack 2
- Microsoft Data Access Components 2.7
- Microsoft OLE DB Provider for Oracle Server 1.0
- Microsoft OLE DB Provider for Oracle Server 1.0
| kbhotfixserver kbqfe kbsqlserv2000sp3fix kbbug kbfix kboracle kbsqlserv2000presp3fix KB312994 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate