can't connect to sql server using ip number

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?
 
C

Cor Ligthert [MVP]

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
 
G

Guest

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

AC
 
G

Guest

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
 
R

Ron Allen

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------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top