Wednesday, May 19, 2010

Making Connection Strings Rapidly

This is great technique to create complex connection string. so now there is no need to remember complex connection strings.


Steps
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. Though it is built for OLE DB
type of connection, you can use for SQL Server connection by removing Provider attribute.

1 comment:

  1. This is really a good practice to create a connection string , i like this very much, the articial was rally give me a great helping hand.

    Thanks Akshat kumar.. keep writing blog .

    ReplyDelete