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

database connection

Status
Not open for further replies.

parames

MIS
Jun 26, 2000
71
MY
Hi list.. Need help from you all..

My asp codes is in different server and my MS-SQL database is in another server. How to connect to the database in asp using the dsn that i've created in sql server?
Normally we use something like this if the database and the asp is in the same server:
Set AdoDb=Server.CreateObject("ADODB.Connection")
AdoDb.Open "dsn=nmpm;UID=popop;passwd=oppiu"

But how to do this connection if the database and asp is in different server?

Please help..

Thanks and Best Regards,
Parames.s
 
You can use a DSN to connect to a remote server -- the SQL Server should have an IP address, and that's how you get to it...

It will ask you for the information in the DSN setup.

If you would rather, you can also do a DSN-less connection (which would make your application more portable), and here's the FAQ that was written on different ways to set up a connection --

faq333-178

good luck! :)
Paul Prewett
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top