Link to home
Start Free TrialLog in
Avatar of Todd_Anderson
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
ASKER CERTIFIED SOLUTION
Avatar of chinu1310
chinu1310
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Todd_Anderson
Todd_Anderson

ASKER

chinu1310,

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
Glad to help you. :)