Crystal Reports, Data Sources, Programming, Technology, UDL

UDL Files: How to Create and Configure Universal Data Link Files

UDL files can be incredibly useful for a variety of reasons (please see my earlier post for details). In this article I will explain the steps for creating and configuring a UDL file.

Creating a UDL file is quite straightforward. Here are the steps:

  1. First create a new text document in Windows Explorer and give a name to your new file, making sure you set the extension to .udl  (or you can open notepad and save it using .udl extension). Either way, make sure nothing is entered in the notepad document.
  2. Once you have created your new .udl file, the icon for your file should change from the icon for a text document to a special icon specific to .udl files
  3. Now double click your new .udl file in order to open it.
  4. Windows will bring up a .udl file editor that looks very similar to what one sees when setting up an ODBC data source.
  5. Click on the first tab of the .udl file editor. This is the Provider tab where you can select how you want to connect to your data source. To connect to MS SQL Server I usually select the option “Microsoft OLE DB Provider for SQL Server”. Here is an image of what the Provider tab looks like:

    UDL Data Source Configuration - The Provider Tab
    UDL Data Source Configuration - The Provider Tab
  6. Then either click the Next button or click the Connection tab. Here is an image of what the Connection tab looks like:

    UDL File Creation - The Connections Tab
    UDL File Creation - The Connections Tab
  7. On the Connection tab you will be able to select the details of how you will connect to the data source. For example when connecting to MS SQL Server you will be prompted to enter:
    • The Server Name (ie: the network name of the database server you want to connect to)
    • You can choose what account to connect with. This can either be using a network account, or a SQL Server user account
    • A situationally useful option is given that allows you to save the password of the SQL Server user account you would like to use to connect to the database server. Although if misused it could be a security risk, this can be used when safely behind the network firewall and is quite useful when for example managing the credentials of a large number of reports.
    • You are also asked to identify the database to connect to.
  8. Once you have provided the necessary information on the Connections tab, click the ‘Test Connection’ button. If all has gone well, the test will run and a message will appear saying that the test was successful. If so, then congratulations, you now have a working .udl file!



3 thoughts on “UDL Files: How to Create and Configure Universal Data Link Files”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s