December 2013
Intermediate to advanced
1872 pages
153h 31m
English
To start coding with ADO.NET and SQL Server, you first need to connect to an instance of SQL Server. To do this, you need a connection string. A connection string is simply a string literal that contains all the parameters necessary to locate and log in to a server in a semicolon-delimited format. The following is an example:
"Data Source=SQLServer001;Initial Catalog=AdventureWorks2012;IntegratedSecurity=True"
This connection string tells ADO.NET to connect to a server called SQLServer001, change to the AdventureWorks2012 database context, and use integrated Windows security to connect, which means it should use the credentials of the currently authenticated user (in web applications, ...