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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot connect to remote Access database

Status
Not open for further replies.

D1000

Technical User
Aug 16, 2002
46
US
We are using classic ASP/Crystal 9 RDC to try and connect to a Microsoft Access data source through a Crystal report.

The Access .mdb file is sitting on a remote file server that is accessed through a share.

We created a System DSN on the web server that points to the Access database using a UNC path:

\\myserver\share\Access.mdb

There are full rights on the share.

When we try to run a Crystal report using the following ASP code:
~~~~~~~~~~~~~~
Set Session("oApp") = Server.CreateObject("CrystalRuntime.Application")
Set Session("oRpt") = Session("oApp").OpenReport.... ~~~~~~~~~~~~~~

we get the following error:

Error Occurred Reading Records: -2147189176: Logon failed. Details: HY000:[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.

According to all the documentation this is a security issue with the web user being unable to connect to the remote file server.

The web site uses Anonymous Authentication and we changed the anonymous account from IUSR to a domain admin account that has full access to that share. Also if we use an ASP page that contains the following code it works (this uses the same ODBC DSN that the Crystal report is using):

~~~~~~~~~~~~~~
<% Set MyConn = Server.CreateObject("ADODB.Connection") MyConn.Open "Access Test"
SQL_query = "SELECT * FROM User"
Set RS = MyConn.Execute(SQL_query)

WHILE NOT RS.EOF %>
<LI><%=RS("Name")%>
<% RS.MoveNext
WEND
%>
~~~~~~~~~~~~~~

This ASP page is in the same web site as our Crystal ASP page. If the Access database is moved locally to the web server, the Crystal report also works, but we cannot move the database over - it must be on the remote file server.

Why is the Crystal ASP code not able to access a remote flat file data source even though we have set all the security permissions correctly?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top