Create Connection String Through Notepad

For communicate with database, the most importing thing required is connection string. Here I will tell you simply way to create your connection string.

Following is steps to generate your Connection String:

  • Open your Notepad and create an empty text file, then click File -> click Save -> and  save it with the File name: "TestConnection.udl" to your desktop. (as shown in following screen)

  • Go to your desktop and double-click on the TestConnection.udl file you just created and the Data Link Properties box will pop up. 
  • Select Provider tab and Find the provider that you want to connect with and click Next. (as shown in follwoing scrren)



  • Now from the Connection tab, select or enter your source/ server name -> then enter information to log on to server -> and select the database on the server.

  • Click Test Connection and click OK to save the file.
Note: If errors occur during testing of your connection string, you will get a pop up box with the error message.
  • Now right click on your TestConnection.udl file and open with Notepad you get your connection String.
 Enjoy your coding.

Comments

  1. thanks for posting...It will really help me a lot :)

    ReplyDelete

Post a Comment

Popular posts from this blog

Introduction to MVC

Error when you browse your ASP site from IIS