MS SQL Server Database Connection String in C#

In this article, I have listed C# code snippets of connection string for MS SQL Server Database.

MS SQL Server Database Connection String in C#:

Connection String provide the required information to the driver that tells where to find the default connection information. Optionally, you are allowed to specify attribute=value pairs in the connection string to override the default values stored in the data source.

1. ODBC DSN ConnectionString

2. ODBC – Standard Connection

3. ODBC – Trusted Connection

4. OleDb – Standard Connection

5. OleDb – Trusted Connection

6. OleDb – via IP Address

7. NET DataProvider – Standard Connection

8..NET DataProvider – Trusted Connection

9..NET DataProvider – IP Address

– Article ends here –

Recommended:   Visual Studio C# Code Snippet List
Share this:

Kiran is a Software engineer by profession and Enthusiastic blogger, love to write articles on computer technology and programming. Reach him at

We will be happy to hear your thoughts

Leave a reply

Shopping cart