Solved

Accessing a database remotely using ASP

Posted on 2001-06-26
4
147 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Code Editors 10 216
importing  maven Project 5 324
bootstrap align photos when printing 10 90
In Apex. moving changes from dev. environment to production 1 66
In this short web based tutorial, I wanted to show users how they can still use the powers of FrontPage in conjunction with Expression Web 3.  Even though Microsoft eliminated the use of Web components, we can still use them with FrontPage and edit …
Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
The purpose of this video is to demonstrate how to make a WordPress Site faster and smaller in size by cleaning up the database. This will be demonstrated using a Windows 8 PC. Plugin WP Optimize will be used. Go to your WordPress login page. T…
The purpose of this video is to demonstrate how to Import and export files in 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 : Click on Too…

756 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