Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Active Server Pages (ASP)
Expertise: Beginner
Dec 16, 1999

Connect to a Remote Database Using ASP

Question:

How do I connect to an Access database that resides on a network server other than the Web server? My goal is to query the Access database and display the results in an ASP page. However, after I set up a DSN on the Web server, I get the error message:

Microsoft OLE DB Provider for ODBC Drivers error '80004005' 

[Microsoft][ODBC Microsoft Access 97 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.

If I copy the database to the Web server and access it locally, it works. If I copy my ASP file to the same directory on the remote server where the Access database resides, set up a virtual directory to that location across the network, and then access the ASP page using the virtual directory, it also works. However, I want to access the database across our network using the ASP page on the Web server.

Answer:

There could be two reasons why you cannot see the database from your Web server. First, you are using a drive letter for the location of the database and this is not resolving correctly. Instead, try using a UNC name (\\servername\drive\directory) to locate your database. Second, when you access the database from your Web server (via ASP), the account that the Web server uses is a special user account called IUSR_yourservername. This user has permissions to mess around with the same machine (Web server), but he does not have permissions across the network on the database machine. See if you or your network administrator can provide access permissions to this user across the network. Then try again.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date