PDA

View Full Version : Can I have an asp page access an Access DB on other server?


dvlnblk
06-11-2003, 02:14 PM
Can I have an asp page access an Access DB on other server? I heard it might be possible with dbpath or something but I have no idea how to impliment it. Can someone tell me if it is possible and if so the syntax? Thanks, Dvlnblk

galvatron
06-11-2003, 10:12 PM
I think so if you know the path. just use a dnsless connection

example :-

<%
set conn=Server.CreateObject("ADODB.Connection")
conn.open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("db/dbweb.mdb")
%>


db/dbweb.mdb replace with the path of the database for an example http://imgonnagityousucka.com/db/sucka.mdb

not sure if this works though haven't tried. theoritically it should though.

Kodo
06-12-2003, 02:29 PM
server.mappath takes place on the server that is executing it. hence the server call.

galvatron
06-13-2003, 01:30 AM
ops. sorry ignore my post then. I don't know how to then.

Bullschmidt
06-16-2003, 12:51 AM
Probably not but here is a shot at it:

How do I connect to an Access database / text file on another web server? - 12/31/2001
http://www.aspfaq.com/show.asp?id=2168

tek7
06-18-2003, 12:04 PM
Yes you can, all you need to do is to make sure you connection string is correct and before your DB request.

A good source for connection stings is ConnectionStings.com.

Angelika
06-18-2003, 01:50 PM
http://www.connectionstrings.com/