Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Named pipes versus TCP/IP

0 views
Skip to first unread message

Peter Joules

unread,
Jul 3, 2001, 8:23:53 AM7/3/01
to
I have the following code in a Visual Basic OnClick function which opens a
connection to a remote SQL Server:

With cn
.ConnectionString = "driver={SQL
Server};server=[server];uid=sa;pwd=;database=[database];"
.ConnectionTimeout = 10
.Open

End With

On some computers this works fine and the connection is opened. On others
it attempts to use Named Pipes to connect to the remote database which
fails.

Is there any parameter I can pass or environment variable I can set so that
TCP/IP is always used?

I have also come across a similar problem, which may have the same answer,
and that is as follows. When using a machine which has Enterprise Manager
installed to connect to a remote SQL Server, it tells me that the server
does not exist. If I set up an ODBC Connection to a local server and tell
it to use TCP/IP, the connection in Enterprise manager then works OK.

TIA
Pete


Andrew R. Flagg

unread,
Jul 4, 2001, 1:13:23 AM7/4/01
to

i hate to ask, but I'm not sure if you need the right database drivers on
the client machine. Since this is an application, I presume you don't need
the Client Manager configured for ODBC entry.

a little unsure of my answer with regards to your problem.

"Peter Joules" <pe...@investe.net> wrote in message
news:994162963.8041.0...@news.demon.co.uk...

Peter Joules

unread,
Jul 4, 2001, 4:46:02 AM7/4/01
to

"Andrew R. Flagg" <an...@the-onramp.net> wrote in message
news:9hu8m7$i3g$1...@nnrp.atgi.net...

>
> i hate to ask, but I'm not sure if you need the right database drivers on
> the client machine. Since this is an application, I presume you don't need
> the Client Manager configured for ODBC entry.
>

We are running the latest SQL Server ODBC drivers. This seems to be an
issue as to how to tell the ODBC driver to use TCP/IP rather than named
pipes by default. It will do it OK once one has been into the ODBC applet
and set up a DSN, changing the default to TCP/IP, but not when the only
connection is one which is set up on the fly.

--
Regards
Pete


Daniel A. Thomas

unread,
Jul 4, 2001, 6:34:16 AM7/4/01
to
Hi Peter,

The Network Library can be passed as a parameter in the connection
string.
"driver={SQL>
Server};server=[server];uid=sa;pwd=;database=[database];Network
Library=[DLL];"

If you have the MSDN library ADO260.chm has this info in it.

[DLL] name of the network library used to communicate with the SQL
Server.
The name should not include the path or the .dll file name extension.
The default is provided by the SQL Server client configuration.

Dan

"Peter Joules" <pe...@investe.net> wrote in message
news:994162963.8041.0...@news.demon.co.uk...

0 new messages