View Full Version : connection to access database on network server
12-12-2006, 03:02 PM
I have 2 servers networked.
server 1 is my webserver
server 2 has my access database and has a username and password to get on.
I am having trouble connecting to the database(from asp) on the other server:
i'm using the path as \\ip\\folder\db.mdb
i passed in the connection the username and password. -- it is not working.
I also tried creating a dsn on the first server to the second server with username and password but this won't open either from the asp code.
I get a permission error when trying to open it.
12-12-2006, 03:48 PM
Did you try giving permissions for that share to the ASP.NET Account?
12-12-2006, 03:52 PM
i tried giving full permissions and it didn't help.
12-12-2006, 04:09 PM
are the permissions on the folder or the database file?
this is a string I usually use for access, though it requires that you have a virtual folder set up for the db. might work for you...
db = server.mappath("/path/to /mdb/from/web/root/file.mdb")
cst = "provider=microsoft.jet.oledb.4.0; data source=" & db & ";user id=;password=;"
set conn = CreateObject("ADODB.Connection")
12-12-2006, 05:09 PM
in your case above was the username and password of the database or the folder? I think my issue is that the db is not password protected but the directory that the db is in is password protected.
12-12-2006, 05:34 PM
If the folder is the problem, I'd hazard a guess that your web anon user account is missing from the permissions ? This is an NTFS rather than ADO perms thing, I think.
12-12-2006, 05:38 PM
but i tried setting it to full permission and that didn't help - wouldn't that solve it if it was a permmision problem?
12-12-2006, 05:59 PM
if the two servers are on the same domain, yes. If not, the permissions need to be explicit from domain1/iusr_...... to domain2
12-12-2006, 06:55 PM
the first server is a web server.
the second is not a webserver but just a server in the office networked to the web server.
what do i have to do to set the proper permissions?
all I did so far is right click and go to sharing and give full sharing.
12-13-2006, 10:56 AM
I find that being explicit on the permissions for the share helps.
YOu also need to make sure the folder used for 'temp' has the same read/write access.
12-13-2006, 11:07 AM
how do I do this?
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.