Search This Blog

Saturday, March 8, 2014

Easy and simple way to create a connection string.

 Easy and simple way to create a connection string.


1. Open a New notepad and save it with "udl" extension, suppose "New.udl".
2. Now you will see that it's icon is changed.
3. Open it, you will find Data Link properties dialog box.
4. For SQl Server connection string select Microsoft OLE DB Provider For SQL Server in Provider Tab.
5. Click button "Next" or select Connection Tab
6. Here you can select all connection details and press button
 Test Connection. If it is successful close this dialog box.
7. Now open this file using Notepad, you will find the connection string. 
type of connection, you can use for SQL Server connection by removing Provider attribute.
 If you are using SQL Authentication with password, then check the checkbox Allow Saving Password.
This is necessary so that password appears in connection string.

No comments:

Post a Comment