Saturday, 19 April 2014

How to: find Connection String in Visual Studio 2010

This article is about how to generate or find  correct Database Connection String for your application in visual studio 2010. Most of the time people  download project from internet link, there might be chance for error due to database connection string failure. This article will helps and show a simple way to find the exact Connection String.

Getting Started
Open Visual Studio, create/open a Web Site, and click on Tools - Connect to Database option.

Step 1: In the Server Explorer window. provide Server Name and user authentication detail then select the appropriate database.
(Find the below screenshot for your reference)

Step 2: Click on Test Connection, Success dialog should come. If it is not coming then repeat Step 1 process.
(Find the below screenshot for your reference)

Step 3: Click on Advanced Properties button and copy the connection string.

In order to use this connection string into visual studio web.config, copy and paste it into connection string node under web.config -

I tried to present to get the correct Connection String using Visual Studio. Hope this article helped you, please  feel free to post more about it. Please share comments.

No comments:

Post a Comment