Try this:
new SqlConnection("server=hoth\\projectx;user id=jedi;password=yoda;initial
catalog=pubs;");


-----Original Message-----
From: Martin Welch [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 4:18 AM
To: [EMAIL PROTECTED]
Subject: [ADVANCED-DOTNET] SqlConnection and named SQL Server 2000
instance


Has anyone successfully connected to a named database instance with
SQLConnection?

I assumed something like this would work but all I get is server not found
or refused connection errors:

SqlConnection conn = new SqlConnection("user id=jedi;password=yoda;initial
catalog=pubs; data source=hoth\\projectx;");
conn.Open();

I've trawled though google, on line help and msdn but so far I've come up
with nothing.

Can anyone enlighten me?

Martin

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

This message is for the named person's use only. It may contain sensitive and private 
proprietary or legally privileged information. No confidentiality or privilege is 
waived or lost by any mistransmission. If you are not the intended recipient, please 
immediately delete it and all copies of it from your system, destroy any hard copies 
of it and notify the sender. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the intended 
recipient. CREDIT SUISSE GROUP and each legal entity in the CREDIT SUISSE FIRST BOSTON 
or CREDIT SUISSE ASSET MANAGEMENT business units of CREDIT SUISSE FIRST BOSTON reserve 
the right to monitor all e-mail communications through its networks. Any views 
expressed in this message are those of the individual sender, except where the message 
states otherwise and the sender is authorized to state them to be the views of any 
such entity.
Unless otherwise stated, any pricing information given in this message is indicative 
only, is subject to change and does not constitute an offer to deal at any price 
quoted. Any reference to the terms of executed transactions should be treated as  
preliminary only and subject to our formal written confirmation.

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to