Howto: Creating a Microsoft Data Link file (.UDL) for Connecting to Microsoft Access in LabVIEW
December 24th, 2008
A Microsoft Data Link file or Universal Data Link is a universal file that links to a specific database and can be used by many different applications.
UDL File Creation
The way a .UDL file is initially created depends on your Windows installation. This can be created desktop shortcut menu.
- Right-click on the Desktop, or in the folder where you want to create the file.
- Select “New” from the shortcut menu. If Microsoft Data Link is listed, select it.
- Windows 2000 will most likely not have a Microsoft Data Link listed. If this is the case, please refer to the next section.
UDL File Creation (Microsoft Data Link not listed)
If no Microsoft Data Link is listed, the following steps should fix this.
- Right-click on the desktop, or in the folder where you want to create the file.
- Select New, then Text Document.
- Give the Text Document any name with a .UDL extension (“Show file extensions” must be enabled in folder options).
- A window will pop up warning that “If you change a filename extension, the file may become unusable. Are you sure you want to change it?” – select Yes.
- You have now successfully created a .UDL file.
Establish the Connection .MDB or .ACCDB File
At this point you have a Microsoft Data Link file. In order to use this in a database application, a couple more tasks need to be accomplished. In this case, you need to link the .UDL file to an Access database.
- Open Access. Select Blank Access Database and click OK.
- In the File New Database window, save the Database in a location of your choice with any .MDB or .ACCDB extension name.
- At this point you can close Access (just remember where you saved the database to).
- Go back to the .UDL file that was created previously and double-click on it (this is where a link to the Access database is created).
- Click the Provider tab. For .MDB files, select “Microsoft Jet 4.0 OLE DB Provider”. For .ACCDB files, select “Microsoft Office 12.0 Access Database Engine OLE DB Provider”.
- Click the Connection tab. Navigate to the .MDB or .ACCDB Access Database that was created in step 2. Now, the .UDL file is ready to be used in LabVIEW.