Connect to SQL Server 2005 on a server in a workgroup

B

BobRoyAce

NOTE: This is a modified repost of
http://groups.google.com/group/microsoft.public.dotnet.framework.adon...

I have a bunch of lcient PCs that are primarily running Windows XP and
Windows 2003 and they all belong to the same workgroup. In addition, I
have a server PC that is running SQL Server 2005 and it also belongs to
the same workgroup. I am writing a Windows Forms application, using
Visual Studio 2005, which needs to run on each of the client PCs, and
which needs to communicate with the SQL Server 2005 database server.
The connection string below, which works if I run the application on
the server box itself, does not work on the client PCs. What do I need
to change to make this work?

Data Source=R-SERVER\RSERVER;Initial Catalog=KERMIT;Persist Security
Info=True;User ID=bobrod;Password=toad4x;Connect Timeout=0;Packet
Size=4096

Note that the Machine name of the Server box is R-SERVER and the
instance
name I used for the SQL Server 2005 server is RSERVER. The SQL Server
is set up to allow for Local and remote connections using TCP/IP and
named pipes (tried just TCP/IP first with no success).

Someone also tried putting an lmhost file on the client PC to resolve
R-SERVER to an IP address but still no-go.

I changed the connection string to timeout after 60 seconds and it
does, in fact, timeout giving an error that it can't establish a
connection.

As mentioned, the connection string works just fine when run from the
server box.
Does the connection string need to be different in some way to run from
client machines?
 
W

Winista

You client machines probably have firewall (which I would not be surprised
because you mentioned XP clients). You need to modify the firewall settings
to allow connection to SQL server.
 

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