Article ID: 318646 - Last Review: September 15, 2005 - Revision: 1.2 FIX: Visual Studio .NET Query Builder builds incorrect syntax for Jet queries that involve joinsThis article was previously published under Q318646 On This PageSYMPTOMS If you use the Query Builder tool as part of the Data
Adapter Configuration Wizard for the OLEDBDataAdapter object, and you connect to a Microsoft Access database with the
Microsoft Jet OLEDB provider, query syntax that involves more than one table
join may be generated incorrectly. This will result in an error that resembles
the following (table and column names are for illustration purposes only):
Syntax error (missing operator) in query expression
'Employees.EmployeeID = Orders.EmployeeID INNER JOIN [Order Details] ON
Orders.OrderID = [Order Details].OrderID INNER JOIN Customers ON
Customers.CustomerID = Orders.CustomerID CAUSE The query is missing the parentheses that must be present
for the Jet engine to parse the query properly. RESOLUTION Changing the query in the Query Builder or the Data Adapter
Configuration Wizard does not prevent this error because the Wizard resets the
query to the incorrect syntax. However, you can edit the query that the Wizard generates in the "Windows Form Designer Generated Code" section in either of the following ways:
STATUSMicrosoft has confirmed that this is a bug in the Microsoft
products that are listed at the beginning of this article.
This bug was corrected in Visual Studio .NET 2003.
MORE INFORMATIONSteps to Reproduce Behavior
| Article Translations
|
Back to the top
