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

easy way to connect to a server?

Status
Not open for further replies.

Mariootje

Programmer
Aug 10, 2001
33
NL
Hello,

For an application I would like to contact a server and a db on it. Is there anybody with an easy to follow script for this purpose? It would be highly appreciated!

Jerome
 
Well, if you don't have a DSN setup for your database on the server, you can use a connectionless version. But you need to know the path of the database.

I'm copying this from my Beginning ASP with Databases by Wrox book BTW...

set oConn=Server.CreateObject("ADOBDB.connection")
oConn.connectionstring = "DRIVER={Microsoft Access Driver (*.mdb)}"
oConn.connectionstring = oConn.connectionstring & ";DBQ=D:WROX\ASP-ADO\Sailors.mdb"
oConn.open

OF course, the DBQ will have to be the path to your database... but you get the idea.

Mary :)

Rule 1: Don't sweat the small stuff.
Rule 2: EVERYTHING is small stuff!! X-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top