Every time I want to create a new project, I either have to look into previous projects, or go to ConnectionStrings.com. It’s a wonderful site that you can use to find the specific connection string that you may ever need.
For me, however, I typically use 1 of 2 connection strings. It either has a username/password, or it uses integrated security (currently logged in user).
SQL Server 2008 Connection String with User name and Password:
Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;
SQL Server 2008 Connection String with Integrated Security:
Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;
Leave a Reply