BUG: ODBC call fails when filtering a decimal field in Access 2002 (275108)
The information in this article applies to:
This article was previously published under Q275108 Advanced: Requires expert coding, interoperability, and multiuser
skills.
This article applies only to a Microsoft Access database (.mdb).
SYMPTOMS If you run a query or a filter on data from a Microsoft SQL
Server-based table, you receive the following error message:
ODBC--call failed. [Microsoft][ODBC SQL Server
Driver][SQL Server]Line1: Incorrect Syntax near ",".(#170)
CAUSE This behavior occurs because Microsoft Access does not
substitute a period for a comma in a query created on a computer on which the
comma option is selected as the decimal separator under Regional Settings.
RESOLUTION To work around this issue, wrap the value in a data type
conversion function, such as CDbl or CSng. The data type conversion function that you select should closely
correspond to the data type in the table. For example:
SELECT dbo_TableXYZ.Field1, dbo_TableXYZ.Field2
FROM dbo_TableXYZ
WHERE (((dbo_TableXYZ.Field2)=CDbl(1.5)));
STATUSMicrosoft
has confirmed that this is a problem in the Microsoft products that are listed
at the beginning of this article.
REFERENCESFor more information about creating ODBC data sources, click Microsoft Access Help on the Help menu, type set up odbc data source in the Office Assistant or the Answer Wizard, and then click Search to view the topic. For more information about data type conversion functions,
in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type type conversion functions in the Office Assistant or the Answer Wizard, and then click Search to view the topic. For more information
about the SQL Query Analyzer, refer to the following MSDN Web site:
Modification Type: | Major | Last Reviewed: | 8/11/2004 |
---|
Keywords: | kbDatabase kbdesign kbQuery kbtshoot kbbug kberrmsg kbnofix KB275108 |
---|
|