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!

connection string to sqlserver

Status
Not open for further replies.

aspnet98

MIS
May 19, 2005
165
0
0
US
Hello,
I am using the following connection string on my hosted website plan:

dim DbConn
Dim dbDir
Set dbConn = Server.CreateObject("ADODB.Connection")
dbConn.ConnectionTimeout = 0
dbConn.CommandTimeout = 0
DbConn.Open("DRIVER={SQL Server};SERVER=xx.xx.xx;DATABASE=test;UID=tes;pwd=test;")

When I try to switch the connection string to a different sql server (I purchased a dedicated server from another hosting company with a static ip address no dot.com name) it just hangs? It works fine if I use the other servers dedicated web server to connect to the sql db.

For example:
testing.com
sql server (on the static ip from another host)
The above fails...

68.xx.xx.xx (static site's webserver)
static sites sql db
the above connection string works because on same server i guess?

The issue has something to do with being on different servers I guess? I tried a ton of different connection strings for remote sql servers but they all failed.

any ideas? remember the connection string works perfectly if on the same server so please do not post about the status of the db because that works.

thanks,
aspnet98


 
any ideas?

Perhaps there is a firewall blocking connections on the SQL Server TCP/IP port in between the two machines? If I remem ber correctly it is port 1433 by default.

Also try to connect the SQL Enterprise Manager on the local SQL Server to the remote database...
 
If they have changed the port you can use that by coding:
Code:
DbConn.Open("DRIVER={SQL Server};SERVER=xx.xx.xx.xx[red][b],yy[/b][/red];DATABASE=test;UID=tes;pwd=test;")
where [red]yy[/red] is the port number


Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top