For a developer, the MOST COMMON problem is the database connectivity. The most common reason is wrong connection string. Here are the steps to test connection string and see connection problem.
Step 1: Open http://www.connectionstrings.com/
Step 2: Select Database
Step 3: Choose proper format of connection string of a particular provider.
Step 4: Replace you database information in connection string and use it.
Step 5: Still you are facing problem then problem is in your database information.
To check information, in windows
1. Start-> Run-> Type notepad
2. In notepad-> File->Save As -> Type “test.udl”
3. Now close test.udl and Right click on this file Icon and Click on properties
4. First select provider then go to Connection tab
5. Insert Database Information
6. Click on “Test Connection” Button
7. If It is not OK means database is not being accessed, update database information and put it in (step 4) connection string on which test connection succeeded.
Open udl file in notepad again and see connection string.
Note: Password may be absent in connection string due to security purpose. so in this case It is needed to insert manually.
Hope, It helps.
Really this is a good
article, which helps a lot to understand the connection string for
beginners as me as well as developer. i had found another nice post on
connection string which is also having a wonderful explanation on
connection string, for more details check out this link…
Thanks everyone for your precious post.