Create a UDL File
The way a UDL file is initially created depends on your Windows installation. This can be checked from the Folder shortcut menu.
- Right-click on the Desktop or in the folder where you want to create the file.
- Select New, then survey your options:
- If available, select Microsoft Data Link. This is not present in all versions of Windows
- If Microsoft Data Link was selected, your UDL file is created.
- If Microsoft Data Link is not available, select Text Document
- Give the document any name with a .udl extension
- A window may 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.
Link to Microsoft Acess Database
Once you have a Microsoft Data Link file, you need to link the UDL file to an Access database to use it with your application.
- 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).
- Go back to the UDL file that was created previously and double-click 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.
- NOTE: If you are using a 64-bit Windows operating system, the provider tab will not show the Microsoft Jet 4.0 OLE DB Provider or Microsoft Office 12.0 Access Database Engine OLE DB Provider. This is because they are 32-bit database providers. To make 32-bit providers display in the Provider tab, follow these steps:
- Navigate to Start>>All Programs>>Accessories>>Command Prompt
- Type the following command: C:\Windows\syswow64\rundll32.exe "C:\Program Files (x86)\Common Files\System\Ole DB\oledb32.dll", Open DSLFile C:\test.udl, where C:\test.udl is the file path to the UDL file you have created. This will open the UDL file.
- Click the Provider tab, the 32 bit database providers should now show.
- Note: If you are trying to connect to an Oracle database, you can also use the steps above.
- 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.
- You can also use a relative path to the UDL file if you will be moving files and don't want to manually edit the UDL file each time you move the files.