Todd_Anderson
asked on
Why is the query that I made in access not working from my VB.NET app?
VS 2005
VB.NET
I am creating an application that pulls data out of an Access database file. I am using the .NET OLEDB data provider to do this. I created a fairly complex query using the designer in Access. I then switched to the SQL view and cut and past the query into my application that I am developing. I am getting errors in my application. The queries are large so I've been testing pieces of them but getting inconclusive results. Sometimes it looks like there might be key words in my query, other times it looks like the joins have syntax errors in them.
Is there a difference between the query syntax used in Access and the query syntax I should use from my app?
Thanks,
Todd
VB.NET
I am creating an application that pulls data out of an Access database file. I am using the .NET OLEDB data provider to do this. I created a fairly complex query using the designer in Access. I then switched to the SQL view and cut and past the query into my application that I am developing. I am getting errors in my application. The queries are large so I've been testing pieces of them but getting inconclusive results. Sometimes it looks like there might be key words in my query, other times it looks like the joins have syntax errors in them.
Is there a difference between the query syntax used in Access and the query syntax I should use from my app?
Thanks,
Todd
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Glad to help you. :)
ASKER
Thanks for the suggestion. You were right. I added brackets around all table and field names and replaced # signs with ' around my dates and everything worked perfectly.
Todd