Hey guys,
Here's the thing. I have a database in MS access. I have made an application that has to access this DB. Now this database
is on another machine. Lets call it pc1. pc1 and my machine are in same wireless network. But when i try to connect to the database connection fails. Do need to put on internet or is there a workaround for this? let me put connection string i am using for this. Please let me know if there's anything wrong with it.

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\\xxx.xxx.xxx.xxx\\C:\\Users\\user1\\Documents\\DB1.accdb;

Thanks
Ajinkya

Recommended Answers

All 3 Replies

Might I suggest posting the Exception?

At initial glance I am incline to say that the path to the file is inaccessible by the remote machine as C:\blah will map to your local machine. Perhaps try putting it on a share? Again this is just an initial glance that might be nullified by your exception message

Since Access is a file based database (rather than a service based, like Oracle or SQL Server) your code needs direct access to the file. It needs to be on the same machine or a network share.

As for http://www.dofactory.com/Connect/Connect.aspx, that site hasn't updated the Access connection strings in 4 years, I'd use http://connectionstrings.com

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.