Access Opening

lothos12345

Well-known member
Joined
May 2, 2002
Messages
294
Location
Texas
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.
 
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.
 
Unforunately when I tried to use the @ symbol as you suggested it gave me the error "Invalid character". Is there anything else I could possibly try. And again thank you for your help.
 
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.
 
Back
Top