This is working fine for me:

SqlConnection conn = new SqlConnection("integrated security=sspi;initial
catalog=pubs;data source=SKYROCKET\\NetSDK;"); 
conn.Open();
MessageBox.Show(conn.ServerVersion);

So, perhsps the errors are actually correct in your case? Is the server
started? Can yo connect to it with other tools? Does that user have
permissions to access that database?

Mike Gunderloy
http://www.larkware.com/

-----Original Message-----
From: Martin Welch [mailto:[EMAIL PROTECTED]] 

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();

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