Executing MS Access Queries using ADO.NET

J

jeffmeyer7

I'm currently trying to run queries in an Access database using
ADO.NET. My code works when executing a query whose name has no spaces
but errors out if I try to run a query whose name has spaces in it.

Example:
When running a query named: "My Query" I receive an error
message saying a query with the name "My" cannot be found.

Is there any way to get around this problem?

Thanks.
 
P

Paul Clement

On 1 Jun 2006 05:32:16 -0700, (e-mail address removed) wrote:

¤ I'm currently trying to run queries in an Access database using
¤ ADO.NET. My code works when executing a query whose name has no spaces
¤ but errors out if I try to run a query whose name has spaces in it.
¤
¤ Example:
¤ When running a query named: "My Query" I receive an error
¤ message saying a query with the name "My" cannot be found.
¤
¤ Is there any way to get around this problem?

If I understand your question correctly, try enclosing the name within brackets.

Paul
~~~~
Microsoft MVP (Visual Basic)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top