You want to use a single backslash for the datasource i.e. data source=hoth\projectx.
Tested in that a double one does not work while a single one does (for me at least!) Cheers, Iain > -----Original Message----- > From: Martin Welch [mailto:[EMAIL PROTECTED]] > Sent: 18 December 2002 09:18 > 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. > Disclaimer This message may contain information which is legally privileged and/or confidential. If you are not the intended recipient, you are hereby notified that any unauthorised disclosure, copying, distribution or use of this information is strictly prohibited. Such notification not withstanding, any comments or opinions expressed are those of the originator, not of Taylor Made Computer Solutions, unless otherwise explicitly stated. You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.
