Problem connecting to Access on network drive.

B

Brent

Sorry if this is completely newbie, I haven't used Access in a while as my
database.
When I do this it works fine,
OleDbConnection connection = new
OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;" +

@"Data Source=C:\db2.mdb");

But if I move the same access file to my network drive, it gives me an
invalid path error.
OleDbConnection connection = new
OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;" +

@"Data Source=I:\db2.mdb");

'I:\db2.mdb' is not a valid path. Make sure that the path name is spelled
correctly and that you are connected to the server on which the file
resides.

This is all running on my local machine. I've tried using the UNC path also,
no luck. Please help.
 

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

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,230
Latest member
LifeBoostCBD

Latest Threads

Top