How to Test a Database Connection String using NotePad
Create and Configure a Universal Data Link (.udl) File with Notepad.
Updated November 28, 2017
Create a TestConnection.UDL file using Notepad.
UDL file saved to Desktop
UDL file and Data Link properties box.
Data Link Properties box can be used to test a connection to a data provider (such as SQL Server)
I just came across a way to test a data providers connection string (like a SQL Server database) with the help of a plain text file using Notepad. To investigate and test out if your connection string works, your going to want to create a UDL file. To do this, follow these steps:
- Open up Notepad and create an empty text file, then click File -> click Save -> and save it with the File name: TestConnection.udl to your desktop.
- Go to your desktop and double-click on the TestConnection.udl file you just created and the Data Link Properties box will popup.
- Select the Provider tab and Find the provider that you want to connect with and click Next >>.
- 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 popup box with the error message.
Once, you've successfully tested your connection string, now go and compare the details of your TestConnection.udl with your (website) project connection string to see if they are similiar.