FIX: Jet 4.0 Treats "#" as Numeric Wildcard Character (259345)
The information in this article applies to:
- Microsoft Data Access Components 2.1
- Microsoft Data Access Components 2.1 (GA)
- Microsoft Data Access Components 2.1 SP1
- Microsoft Data Access Components 2.1 SP2
- Microsoft Data Access Components 2.5
This article was previously published under Q259345 SYMPTOMS
When you use Microsoft Jet 4.0 and execute a SQL statement similar to the following, Jet 4.0 interprets the hash-mark character (#) as a numeric wildcard instead of a character literal, which causes incorrect results to be returned:
Select * from Table1 where Comments like '#%'
This behavior does not occur with Jet 3.51, which permits records containing the hash-mark character to be returned. In addition, the SQL statement returns the same results when run against both Jet and SQL Server. The Jet 4.0 behavior no longer provides this interoperability.
CAUSE
Parsing changes in the Jet 4.0 expression services incorrectly interpret the "#" character as a numeric wildcard, instead of a character literal.
RESOLUTIONA supported fix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Apply it only to computers that are experiencing this specific problem. This fix may receive additional testing. Therefore, if you are not severely affected by this problem, Microsoft recommends that you wait for the next Microsoft Data Access Components service pack that contains this hotfix. To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site: NOTE: In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The typical support costs will apply to additional support questions and issues that do not qualify for the specific update in question.
The English version of this fix should have the following file attributes or later:
Date Time Version Size File name Platform
----------------------------------------------------------------------
3/21/00 4.0.3921.0 241,936 bytes msjtes40.dll
Workaround
Enclosing the hash-mark character in square brackets ([ ]) forces Jet to evaluate it as a character literal. For example:
Select * from Table1 where Comments like '[#]%' STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
Modification Type: | Minor | Last Reviewed: | 6/5/2006 |
---|
Keywords: | kbHotfixServer kbQFE kbbug kbfix kbJET kbMDAC210SP2fix kbMDAC250fix KB259345 |
---|
|