SYMPTOMS
When you attempt to execute a SELECT statement with parameters by using the ODBC driver for SQL Server 2000 that is included in Microsoft Data Access Components (MDAC) version 2.6 Service Pack 1 (SP1) or Service Pack 2 (SP2), you may receive an error message similar to the following:
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near 'Y'.
The following is the select statement used in this scenario:
SELECT 'X' FROM Authors WHERE (?= 'Y')
NOTE: There is no space between the parameter "?" and the "=" character.
RESOLUTION
A 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.
To resolve this problem, 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 usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.
The English-language version of this fix should have the following file attributes or later:
MDAC 2.6 SP1
Date Version Size File name Platform
--------------------------------------------------------------
11/07/2001 2000.080.0461.00 029,252 odbcbcp.dll x86
10/30/2001 2000.080.0461.00 471,121 sqlsrv32.dll x86
10/30/2001 2000.080.0461.00 090,112 sqlsrv32.rll x86
MDAC 2.6 SP2
Date Version Size File name Platform
--------------------------------------------------------------
04/25/2002 2000.080.0617.00 029,252 odbcbcp.dll x86
04/25/2002 2000.080.0617.00 475,217 sqlsrv32.dll x86
04/25/2002 2000.080.0617.00 090,112 sqlsrv32.rll x86