Wednesday, December 4, 2013

ConnectionString 1: Standard

The connection string is perhaps the most notable item in the config file. Without it, data cannot be fed to the application and, as everyone knows, data is the gasoline of applications.

This is part of the connection strings in a .config file (ie: web.config)

connectionString="Server=COMPUTER_NAME;Initial Catalog=DATABASE; Trusted_Connection=true"

  • Server: computer where the sql server is located
  • Initial Catalog: the database to use
  • Trusted Connection: use integrated security
    • Integrated Security is a synonym and is interchangeable
    • valid values: true, false, yes, no, sspi

Note: With SQL Server 2008r2, I was never able to ever connect using localhost. It had to be the computer name.

Source:


No comments:

Post a Comment