Jump to content
Xtreme .Net Talk

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


Recommended Posts

Posted (edited)

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

Edited by teixeira
Posted

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

Posted
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.
Posted

Try a connection string similar to;

 

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...