Easiest Way to Get SQL Server Database Connection String from Visual Studio

get connection string from visual studio

Connection String:

A string that is commonly used to connect your application to SQL Server Database is called Connection String“.

It contains the information about the data source and also has the security information in it.

Normally it is difficult to find the connection string from the Visual Studio. I am going to share the easiest way to get the SQL Server Database Connection String from Visual Studio.

Here is the Way….
Step 1:

Create a new project in Microsoft Visual Studio.

Step 2:

Right Click on newly created project in Solution Explorer>Add>New Item>Visual C#>Data>SQL Server Database

Step 3:

Select newly created Database from Server Explorer…… View Database from Server Explorer

Step 4:

Go to Properties and copy the connection string and use it in making the connection with the Database.

Find Connection String


This is the easiest way to get the connection string quickly and more accurately.Try this and get yours. If you found any trouble please comment below.Any Suggestion will be greatly appreciated.

Happy coding:-)

Leave a Reply

Your email address will not be published. Required fields are marked *