How do you write that connection string again?


Ever forget the syntax for a connection string, or do you just need to test a connection to a db? Use a UDL for that forgetful memory.

  1. On your desktop, right-click and select new text document. Rename it to something.udl.
  2. Double click the new UDL file on your desktop.
  3. Choose your Provider, and Connection (be sure to check the box ‘allow saving password’)
  4. Click the ‘Test Connection’ button to make sure it’s correct. Now hit the ‘Ok’ button
  5. Now right-click on your UDL and select Open With > Notepad.
  6. There’s your connection string that you can copy

Why does it work? Because a universal data link (.udl) file is really just a text file that contains the connection string for an OLE DB data source

- Dan Lewis

Comments (0)

Skip to main content