| |
|
If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
|
 |

08-20-02, 13:06
|
|
Registered User
|
|
Join Date: Aug 2002
Location: Dublin, Ireland
Posts: 13
|
|
Problem connecting to Access using ASP
|
|
Hi kids,
I'm a newbie to ASP. I've successfully connected to an Access database located on a local drive of my IIS server, but I get the following error while connecting to the same database if I move it to a network shared folder:
"Microsoft JET Database Engine error '80004005'
The Microsoft Jet database engine cannot open the file 'L:\data\testdb.mdb'. It is already opened exclusively by another user, or you need permission to view its data."
L: is a mapped network drive on the IIS server pointing to a folder on another server on the network. Bothe servers run NT 4.0 SP6 and the IIS user account has full NTFS rights to the mdb file and all folders in the path. It is not opened by another user when this error occurs.
The database is very simple - just two tables with some test data, no passwords or anything like that.
My connection string is
("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=L:\data\testdb.mdb")
It's an Access 2000 database.
The line that causes the error is the fourth one below:
Dim dbLogistics
Set dbLogistics = Server.CreateObject ("ADODB.Connection")
dbLogistics.Mode = adModeReadWrite
dbLogistics.Open(strConnectionString)
Eternal gratitude and free beer to the reply that gets me past my first major hurdle in ASP.
Thanks,
Kev
|
|

08-20-02, 13:56
|
|
Registered User
|
|
Join Date: Feb 2002
Posts: 2,232
|
|
Well, I have to know what beer before I reply.
But, seriously ... Normally this is tied to your iusr... account, that iis uses to access the file, not having access on your network or password syncronization is enabled on your iis or you have an mdac version that is buggy or you need to use the unc instead of the letter mapping or ....
The following is a link that will help you:
link
|
|

08-21-02, 05:42
|
|
Registered User
|
|
Join Date: Aug 2002
Location: Dublin, Ireland
Posts: 13
|
|
|
|
Hi rnealejr,
Thanks for that link. Still getting the error message - here's my progress so far:
My IUSR account has been given full rights to the share and the NTFS folder in which the db resides.
IUSR also has full rights to the db file.
The "default open mode" for the Access db is set to shared, not exclusive.
Im IIS Management Console, I've checked the Directory security for the site, the directory, the asp page and the db file - IUSR has full rights for all of these.
I've cleared the "Enable Automatic Password Synchronization" check box on the site and directory.
I've tested connecting with the same user, same page etc by putting the testdb on a local drive on the IIS server and it connects perfectly.
I've set the TEMP and TMP environment variables on the IIS server AND on the file server and given IUSR rights to put temporary files into the temporary directories on each server.
IUSR is a domain account, not a local account, and has rights to log onto all workstations.
I've installed MDAC 2.7 on the IIS server.
I've asked an ASP programmer and she advised me to give up and use a local database.
If you REALLY want that free beer (your choice, but you may have to come to Dublin to get it) could you please let me know where to go from here?
Thanks,
Kev
|
|

08-21-02, 10:13
|
|
Registered User
|
|
Join Date: Aug 2002
Location: Dublin, Ireland
Posts: 13
|
|
Hi Eve,
Thanks for the suggestions. I'm not sure the problem is with my connection string, as I manage to connect perfectly to a local database.
However, I will try them all.
If I use ODBC, MySQL or MS Access drivers to connect, how does that affect my use of recordsets?
What is the alternative structure in VBScript for these drivers?
I want to display the data from my database in a HTML table, which I can do easily enough using ADO recordsets.
Or should I give up, as my friendly local ASP guru suggests? Would this be easier in PHP (of which I know nothing but I am a fast learner)?
Cheers,
Kev
|
|

08-26-02, 15:26
|
|
Registered User
|
|
Join Date: Aug 2002
Posts: 1
|
|
|
ASP connect to database
Try setting application security to "low" instead of medium as a troubleshooting measure. If that works, then you still have permission issues either on a NT folder level, or I_USR level.
|
|

08-26-02, 22:52
|
|
Registered User
|
|
Join Date: Feb 2002
Posts: 2,232
|
|
Have you tried replacing the iusr account with a domain administrator (temporarily) to test ? Also, what does your event viewer reveal ?
|
|

08-26-02, 22:53
|
|
Registered User
|
|
Join Date: Feb 2002
Posts: 2,232
|
|
Your not using ssl are you ? Which authentication method are you using with iis ?
|
Last edited by rnealejr; 08-26-02 at 22:56.
|

08-28-02, 00:26
|
|
Registered User
|
|
Join Date: Jul 2002
Location: Australia
Posts: 147
|
|
I think you have to use a different type of connection string if you are accessing and Access DB on a different server, (not that I've ever got it to work!).
Also might try using the UNC path rather than a mapped drive (L)
Try the strings here:
http://www.able-consulting.com/ADO_Conn.htm
Cheers,
Andrew
__________________
There have been many posts made throughout the world.
This was one of them.
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|