Connecting to SQL Server 2005 on a server in a workgroup

B

BobRoyAce

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 the Machine name of the Server box is R-SERVER and the instance
name I used for the SQL Server 2005 server is RSERVER.
 
G

Guest

Bob,

When you say that the connection string does not work on the client PCs,
what do you mean?

Are you getting a specific error message when trying to connect, at timeout,
or what?

Kerry Moorman
 
B

BobRoyAce

That's a good question. I just got a message from the client saying
that the application couldn't connect to the server from the client
PCs. I don't yet know what the specific error message or number was,
though. I'll try to find out.
 
N

Norman Yuan

The first thing I'd check is the SQL Server2005 Express's configuration. By
default, SQL Server2005 installation disables remote connection. You need to
explicitly enable it.

If your SQL Server Express installed correctly, you can click
Start->Program->Micorsoft SQL Server 2005->Configuration Tools->Sql Server
Surface Area Configuration. Once the tool app started, on the treeview,
selecct MSSQLSERVER->Database Engine->Remote Connection node, then select
"Local and remote connection radio button.
 
B

BobRoyAce

I checked that and it was set to "Local and remote connection"

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. A network guy pu an lmhost file on the client PC to resolve
R-SERVER to an IP address but still no-go. Then we changed the
configuration to allow for TCP/IP and named pipes...still no-go.

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?
 

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