can't connect to sql server using ip number

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My code:
Dim IP As String
IP = "192.168.0.169"
SqlConnection1.ConnectionString = "workstation id=xxxxx;integrated
security=SSPI;Data Source=" & IP & ";persist security info=False;initial
catalog=adp1SQL"

The error occurs when I use the IP address instead "mshome". when
IP="MSHOME" the code runs smoothly.
while in the development stage, this project is only instaled in the PC
where MSDE 2000 is installed. Could this be the problem?
 
AC,

Can you try it with an as short as possible connection String.
Server=192.168.0.169;DataBase=;Integrated Security=SSPI

I hope this helps,

Cor
 
sorry, didn't work.
but the exact same thing happened.
when server=Mshome, everything works.
when server=IP number, doesn't work.

AC
 
ok. I've tried to perfom this connection using a diferent sql server in a
different PC.
and it worked using both ways. (IP number and name)
This tells me that the problem is not on my vb code but in my server
configuration.
any help in how to configure my server to work correctly?

AC
 
AC,
Use the Server Network Utility and make sure that TCP/IP is in the list
of active protocols. For new installations this is normally off by default
nowdays to prevent security holes.

Ron Allen
AC said:
ok. I've tried to perfom this connection using a diferent sql server in a
different PC.
and it worked using both ways. (IP number and name)
This tells me that the problem is not on my vb code but in my server
configuration.
any help in how to configure my server to work correctly?

AC
-----------snip------------
 
Back
Top