ASP.NET using a shared Access database... troubleshoot

teixeira

Regular
Joined
Apr 5, 2005
Messages
94
Location
LEIRIA-PORTUGAL
Hi all,

I'm developing our company Intranet using VS2005/C# and all works fine in my computer, but now that I wanna put the site in the server, i'm having some troubles with my connections to this shared database, with the information of the employers. THis database is used by 10 machines and I wanna create a connection that could use the database, does anyone knows how can I access to this shared database?
When I try to connect to a copy of this database in my pc it works just fine, but when i upload it to the server it gives an error about database connection/permissions.

Any ideas/help will be great... thanks in advance

Teixeira
 
Last edited:
Sounds like your connection string is not correct somewhere. Would you mind posting it?


Tate
 
Thanks for your time.

Here's the connstring:

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\\\Server\\database.mdb;Persist Security Info=False"

The database doesn't have any password ( at least now )

Thanks,

Teixeira
 
ASP.NET does not have read/write permission to the folder you are storing it in. It needs read permission for obvious reasons, it needs write permissions to create the mdl file that is created whenever you open Access. This is why it probably works on your local machine and not your server.
 
Try a connection string similar to;

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/??path??/database.mdb") & ";User ID=Admin"
 
Back
Top