all groups > sql server connect > october 2004 >
You're in the

sql server connect

group:

SqlServer does not exist...


SqlServer does not exist... bruce lawson
10/31/2004 10:58:09 PM
sql server connect:
Hi, Newbie here. I'm trying to connect in Visual C# to the Northwind
database using ADO:
SqlConnection conn = new SqlConnection(@"DataSource=localhost; Initial
Catalog=Northwind");

The password and user id were left blank in setup so I assume I shouldn't
have to enter anything there. I've also tried DataSource=
(local)\\NetSDK and various permutations. This triggers the error during
runtime of 'SqlServer does not exist or access denied'. I tried setting
passwords and including in the connection string, all to no avail. Not sure
what the UserID has to be in the string.
Any help is very appreciated. Also a followup ?, where or how does the
server know what path on the server, the various databases have? Are they in
the registry?
BLawson


Re: SqlServer does not exist... Dejan Sarka
11/1/2004 9:37:08 AM
[quoted text, click to view]

You need to provide SQL login and password or use integrated security. Check
connection strings at
http://www.able-consulting.com/dotnet/adonet/Data_Providers.htm#SQLClientManagedProvider.
You should read the "Managaing Security" part of the SQL Server Books OnLine
as well.

[quoted text, click to view]

SQL Server tracks it's databases in system tables in the Master database.
Physical location of the Master db files is stored in registry.

--
Dejan Sarka, SQL Server MVP
Associate Mentor
www.SolidQualityLearning.com

Re: SqlServer does not exist... Bruce Lawson
11/1/2004 12:55:26 PM

Thanks for the info. It's much appreciated.
BLawson



*** Sent via Developersdex http://www.developersdex.com ***
AddThis Social Bookmark Button