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

Using ADO to connect to DB on remote server from EXE

Status
Not open for further replies.

warche

Programmer
Aug 14, 2002
13
US
I'm trying to connect to a database that I have online in a VB .EXE that I am making. I can open the connection to my database using ASP from a Web Browser as normal(I'm using WEBSITE & DATABASE instead of real names):

Set DB = Server.CreateObject("ADODB.Connection")
DB.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=E:\w3\WEBSITE.com\_data\DATABASE.mdb;"

The problem I have in my program is that I don't know how to have program look at my website.

I saw on MSDN that you can put URL= in the ConnectionString, but I couldn't find any explanation for what exactly that would do. I'm guessing that the ConnectionString should look something like what I have below, but I'm only guessing.

Dim DB as ADODB.Connection
Set DB as New ADODB.Connection
DB.Open "DRIVER={Microsoft Access Driver (*.mdb)};URL=http://WEBSITE.com/;DBQ=E:\w3\WEBSITE.com\_data\DATABASE.mdb;"

or maybe

DB.Open "DRIVER={Microsoft Access Driver (*.mdb)};URL=http://WEBSITE.com/_data/DATABASE.mdb;"

Any help would be appreciated.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top