Solved

Accessing a database remotely using ASP

Posted on 2001-06-26
4
149 Views
Last Modified: 2010-04-07
Hello,

I aould like to access an Access 2000 database remotely usign an ASP web page (uses VBScript). Currently I use this code to access a local database :

Set DBCon = Server.CreateObject("ADODB.Connection")
  With DBcon
   .Provider = "Microsoft.Jet.OLEDB.4.0"
   .open server.mappath("database.mdb")
  end with  

Is there any way I can access a database on another server? I tried using a URL in the open command but it didn't work.

Thanks
0
Comment
Question by:Ktoshni
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 3

Expert Comment

by:erikdr
ID: 6227284
Did you mean 'URL' or 'UNC' ?
Basically with UNC (//servername/sharename/database.mdb) it should work, IF...

the process running the ASP has enough credentials to access the remote server. After all its logon is being used,
UNC addressing for a file is quite similar to first running a NET USE and then prefixing the file with a drivelletter.
And of course, //servername  is preferably to be found through DDNS - although you could also use the IP address instead of the name.

Hope thiz helpz,

<Erik> - The Netherlands

0
 

Author Comment

by:Ktoshni
ID: 6227712
No, I want to access the database through a URL if possible since the database is on a server outside the company network
0
 
LVL 7

Accepted Solution

by:
daniel_c earned 100 total points
ID: 6230868
You can't access database through a URL.
It needs the physical path of the database its self.

If it is located on the separate machine, my first try will be using DSN connection.

So, the connection will be like this:
set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open "DSN=myDB;" & _
            "Uid=;" & _
            "Pwd=;"


Hope this helps!

^_^
0
 

Author Comment

by:Ktoshni
ID: 6301693
Thanks, sorry I took so long to answer.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
The purpose of this video is to demonstrate how to insert an Iframe into WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Open Page or Post…
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question