Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I am trying to run a report created in Microsoft Access from VB.NET. However every time I try to run the report it tells me that the Access Database is missing or I do not have access to it. Which is funny because I was able to populate a DataGrid using the same database off of a OleDbConnectionString. The error is occuring on the line that I pasted below:

 

appAccess.OpenCurrentDatabase("\\<ip address>\database folder\DailyFloorOpps\AllStoresDB\DailyFloorOpps.mdb")

 

Any help with this would be greatly appreciated. And yes I do close the OleDb connection before running the above code.

Posted

Possible problem with escape characters...

 

You may want to consider putting the @ character in front of your path string:

 

appAccess.OpenCurrentDatabase(@"\\<ip address>\database folder\DailyFloorOpps\AllStoresDB\DailyFloorOpps.mdb")

 

This will prevent those back-slashes from being seen as special characters. I hope this helps.

Never ascribe to malice that which is adequately explained by incompetence. - Napoleon Bonaparte
Posted
I am not 100% sure why, but i just tried using oleDBconnection to open my database in ACCESS and got an error so I used the odbcconnection and it worked.
Live as if you were to die tomorrow. Learn as if you were to live forever.
Gandhi

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...