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

connect to remote SQL DB

Status
Not open for further replies.

plook

IS-IT--Management
Apr 1, 2000
33
0
0
Hi there..

I am trying to set up a connection to my database from a different server, but i'm having difficulties.

I was given this code to connect...

"
<%
Set conn = Server.CreateObject(&quot;ADODB.Connection&quot;)
DSNtemp=&quot;DRIVER={SQL Server};SERVER=ServerName;UID=USER;PWD=password;DATABASE=databasename&quot;
conn.open DSNtemp
%>
&quot;

It looks cool, but, can I put the IP of the server instead of the &quot;ServerName&quot; ? If I can't put the IP, what would I need to do in order to connect to a remote DB like that ?

Thanks for your help

Dominic

 
yes you can put the server ip there, and make sure any firewalls in between allow access on the sql server port (1433 or some such from memory) codestorm
Fire bad. Tree pretty. - Buffy
select * from population where talent > 'average'
<insert witticism here>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top