How to acess mdb from a remote machine in ASP

  • Thread starter Thread starter Rajesh R.
  • Start date Start date
R

Rajesh R.

Hi,
I have developed an application in asp with backend as ms-access database.
The mdb file is on a one machine and my IIS is running on a different
machine. The code which I tried is as follows
<%
set con = server.CreateObject("adodb.connection")

I tried both dsn and dsn-less
DSN-LESS
con.Open "Driver={Microsoft Access Driver (*.mdb)};Dbq=\\<machine
name>\remote\remotedb.mdb;"

DSN
con.Open("DSN=remote;")

set rs = server.CreateObject("adodb.recordset")
Set rs = Con.Execute("Select * from Employee")
response.write("Sucess")
%>

The changes what I did in IIS
In directory security of this application I changed the Authentication
method to IUSR_MACINENAME with Allow IIS to control password. But when I
view the page its throwing error, which is given below

Microsoft OLE DB Provider for ODBC Drivers (0x80004005) [Microsoft][ODBC
Microsoft Access Driver]
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.

Please let me know how to resolve this problem.
I looked at KB article no. 189408, and as described, took off the password
control from IIS.
but still it is not solving my problem. And I also have the reqd.
permissions on the folder that contains the mdb file.
Pl note that there is no error when I run the application from the same
machine where IIS is running.
The problem occurs only if I access the application from a client machine.
Please advice accordingly.
What should be the code in ASP and what should be IIS settings.

Regards,
RR
 
Rajesh said:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver]
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.
Your answer will be found in this article:
http://www.aspfaq.com/show.asp?id=2009
Read carefully. :-)


HTH,
Bob Barrows
 
Back
Top