views:

61

answers:

3

Hi,

I have an ASP.NET web application that accesses an Access Database. The Access Database is only for testing purposes. I have hard coded the connection string which is correct, yet the application throws an error saying:

C:\MyDb\Db.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.

My Connection String is:

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyDb\Db.mdb;

This is the correct path, why can't the developement server see the database? Do I have to configure it?

Please Help

A: 

See 'Not a valid path' Error when Using Access Data Source, I think it may help.

David Glass
A: 

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyDb\Db.mdb;Persist Security Info=True

Jeff O
A: 

Are you using IIS? If so, does the IIS server have access to this file directory?

clyc
Have tried that, added the group Everyone with modify permissions, should be accessible to all now
Gaz
Can you post the code that accesses the database?
clyc
JohnFx has a point. Is your Access db on the same machine as the IIS web server?
clyc
You also need to make sure that the IIS service user has rights to the file - which it may not by default if you put the database in the folder before you changed the access rights to the folder
Murph