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!

Connecting To SQL Database Over Network

Status
Not open for further replies.

OrWolf

MIS
Mar 19, 2001
291
I have created an ASP web page that is currently connected to a test Access database. It's now time to move the connection to the live SQL database, however I'm having a hard time coming up with the correct syntax. The web server and SQL server are two seperate boxes (server17 and server58 respectively). What's the best way to set up this connection?
 
Easiest way is to set up a DSN for the DB Server on the Web Server, and then just use that:

dim con
set con = server.createobject("ADODB.Connection")
con.open ("DSN=dsnName;UID=userID;PWD=password")

Should fix you right up --

:)
Paul Prewett
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top