Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 19th, 2005, 11:00 AM
Rajesh R.
Guest
 
Posts: n/a
Default How to acess mdb from a remote machine in ASP

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


  #2  
Old July 19th, 2005, 11:00 AM
Bob Barrows
Guest
 
Posts: n/a
Default Re: How to acess mdb from a remote machine in ASP

Rajesh R. wrote:[color=blue]
>
> 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.
>[/color]
Your answer will be found in this article:
http://www.aspfaq.com/show.asp?id=2009
Read carefully. :-)


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.


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles