Executing MS Access Queries using ADO.NET

  • Thread starter Thread starter jeffmeyer7
  • Start date Start date
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.
 
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)
 
Back
Top