Simple way to test connectivity or compose OLEDB connection strings

This tip has been around a while, but I still run into developers who don’t know it, so it’s worth a post.

If you ever need to test connectivity or compose a valid OLEDB connection string, try this:

  1. Create an empty text file.
  2. Rename the extension from TXT to UDL
  3. Double click this file. The Data Link Utility appears
  4. Back up to the Provider tab, make sure you have the correct Provider selected
  5. Fill in the correct Connection information
  6. Click “Test Connection”

This is a good way to remove many of the variables associated with connectivity, and focus just on the data connectivity and security context.

And there’s an additional benefit – this UDL file is simply a specialized text file that contains an OLE-DB connection string. You can open up this file using any text editor.

Leave a Reply

Your email address will not be published.