Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IIS virtual directory mdb problem

Status
Not open for further replies.

alwaysAnewbie

Programmer
Sep 12, 2002
23
US
First.... I tried this using UNC but no luck.
Second... I don't think this belongs in the ASP forum but please let me know if I am wrong.

I have IIS 5.0 running on serverA. The IIS user is a local user (IUSR_SERVA).

I have an Access 97 DB on serverB that I need to query using ASP . I have a local user on serverB called IUSR_SERVA. I set the permissions on serverB so that IUSR_SERVA has read and write permissions to the share and the mydb.mdb file on the share.

I created a virtual directory in IIS called DBs that points to \\serverB\application\DBdir using a domain user dbuser. I set the permissions on serverB so that dbuser has read and write permissions to the share and the mydb.mdb file on the share.

The result is I can browse the DBdir ( directory from my web browser (turned on browsing to test) but I can't open the database using ASP ( I get the error 80004005 The Microsoft Jet database engine cannot open the file '(unknown)' It is already opened exclusively by another user, or you need permission to view its data.

The ASP code is:
Dim Conn
Set Conn = Server.CreateObject("ADODB.Connection")
MdbFilePath = Server.MapPath("DBs\mydb.mdb")
Conn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & MdbFilePath & ";"

I know it is a permissions problem but I can't figure out what is wrong.
 
Thought I would add...

IUSR_SERVA has full permissions on %TEMP% and %TMP% on servA.
 
1st off, yes this post should be in the ASP forum...

ok.. You may want to add Change permission instead of Read/Write, you will need Update as well first off. 2nd, since it's an access database and access is really not coded that well it only likes to open 1 connection per database for update. If you are trying to update it and it has not released its connection this could be your issue. I would not use a DSNless connection, but rather a System level DSN and call the DSN in the asp code..
 
I posted this to the ASP Forum and am waiting for a response but I thought I would respond to you.

I went away from a DSN because of the requirement to map a drive on the IIS server to create the DSN. I also read alot about the overhead involved in a DSN connection.

The queries will always be selects on this database. There is another application that does the updates. This is the reason I cannot put the database on the IIS server.

The application is not strong from a reporting standpoint which is why I need to use ASP to develope web based reports.

What I don't understand is the virtual directory allows me to browse the folders and open the database but I can't open the database using the application code above.
 
> The Microsoft Jet database engine cannot open
> the file '(unknown)' It is already opened
> exclusively by another user, or you need permission
> to view its data.

> There is another application that does the updates.

Are you sure the other app is not opening the db in exclusive mode?

buho (A).
 
Are you sure the other app is not opening the db in exclusive mode?

I shut down the app. Copied the database to a new name in the same folder and compacted it. I gave the new database the same permissions as the old database.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top