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

connect to a DB on another server

Status
Not open for further replies.

TheCandyman

Technical User
Sep 9, 2002
761
US
I have always done connections to a Access DB which is on my server, but now i need to connect to seperate server (not on my domain) which has the DB i need to connect to. How do i do this? By IP? By URL?

Normally it's something like this
Code:
Set Conn = CreateObject("ADODB.Connection")
strCon = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& Server.MapPath ("/db/DB.mdb")
Conn.mode = 3
Conn.open strCon

Set rs = Server.CreateObject("ADODB.Recordset")
 
I notice that you don't seem to be getting the answers that you want in this forum, with 68 questions asked, very few posts saying 'Thank you, that worked', and only 2 marked as helpful. If you aren't getting the right answers, please read faq222-2244 to see how to get the best from the forum. If you are getting your answers, please read faq222-2244 to see how to acknowledge them.

For this particular problem (and all your other connection string problems) try this:

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
It is going to be very difficult connecting to a file-based database like Access on a machine outside your domain.

I would start by trying to figure out how to "see" the .MDB file in "My Network Places (formally Network Neighborhood)"

If you just go after the file over HTTP like was suggested above ( then that would be equivilant of downloading the file to your local server... not really using the remote file but rather a static copy of it.

Honestly if you really want to use a database that is outside your domain it should be a real database with native support for TCP connections like MS SQL Server or Oracle.
 
Sheco,

Thanks for the example. I can't seem to get it working, maybe grabbing info by domain isn't allowed?? I'm going with plan B and using a scheduled FTP to grab that DB and then use it locally.

 
Just bear in mind that, as Sheco mentioned, it will only be a static copy of the database and not live, so if you're planning on using it for live data, you will be better off seeking another database that supports TCP connections.

------------------------------------------------------------------------------------------------------------------------
"Men occasionally stumble over the truth, but most of them pick themselves up and hurry off as if nothing ever happened."
- Winston Churchill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top