Re: Connection Problem - ASP to remote Access db
am 14.06.2005 21:15:04 von reb01501MP wrote:
> I'm having a problem connecting to a Access DB on a remote computer
> (on the intranet).
>
> This is the error I am getting:
> -----
> Microsoft JET Database Engine (0x80004005)
> The Microsoft Jet database engine cannot open the file
> '\\boswald_sci\sysdata\newdb.mdb'. It is already opened exclusively by
> another user, or you need permission to view its data.
> ---
>
> Here is are my connection(s) (notice when I use the local connection
> it works just fine):
>
> (REMOTE) strDBPath = "\\boswald_sci\sysdata\newdb.mdb"
> (LOCAL) strDBPath = Server.MapPath("newdb.mdb")
> Set cnnSearch = Server.CreateObject("ADODB.Connection")
> cnnSearch.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
> strDBPath & ";"
>
> I have had a domain user created; this user has been added to the
> permissions (read, execute) on the database in question on the remote
> machine. I have set up IIS 5.1 to use that user as the anonymous
> user. So when I run the ASP file from the website it should use that
> user to connect and get the data. There is no locked file in the
> directory.
>
That last sentence explains things. In order for multi-user activity to
occur, there NEEDS to be a .lck (database locking) file in the folder. In
fact, all users accssing the database must have the ability to create,
modify and delete that .ldb file, which means all users must have Modify
(Read/Write) permissions for the FOLDER containing the database file.
HTH,
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.