What is the format of a SQLConnection connection string?

complete

Member
Joined
Oct 24, 2012
Messages
14
Programming Experience
3-5
What is the format of a SQLConnection connection string that is passed in the constructor method? I have run a search engine search online and all I could find so far is examples like:
C#:
 "Data Source=(local);Initial Catalog=AdventureWorks; Integrated Security=SSPI;";
or
C#:
 "User Id=sa;Server=localhost;Initial Catalog=Test;"
The examples raises questions. Since the SQL Server Management Studio (SSMS) program offers a different set of fields during start up in order to connect to a database, I have to ask how does "Server type, "Server name", "Authentication", "User name" and "Password". Also, is "Catalog" another name for a database table?
 

JohnH

C# Forum Moderator
Staff member
Joined
Apr 23, 2011
Messages
1,460
Location
Norway
Programming Experience
10+
Top Bottom