Professional Documents
Culture Documents
Home ❯ Support ❯ Creating a Microsoft Data Link file (UDL) for Connecting to a Database in LabVIEW
LabVIEW Windows
LabVIEW Database Connectivity Toolkit
The Database Connectivity Toolkit in LabVIEW requires a Microsoft Data Link file (UDL) to interface with a Microsoft
Access database. UDL files can also be used to connect with other database types, such as SQL. How do I create a
Microsoft Data Link file with a .udl extension in order to do this?
The way a UDL file is initially created depends on your Windows installation. This can be checked from the Folder
shortcut menu.
1. Right-click on the Desktop or in the folder where you want to create the file.
2. Select New, then Text Document (or Microsoft Data Link if you have that option)
1. If Microsoft Data Link was selected, your UDL file is created.
3. Give the Text Document any name with a .udl extension ("Show file extensions" must be enabled in folder
options).
4. 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.
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.
1 of 4 08/02/2020 09:19
Creating a Microsoft Data Link file (UDL) for Connecting to a Databas... https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z00000...
6. 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.
2 of 4 08/02/2020 09:19
Creating a Microsoft Data Link file (UDL) for Connecting to a Databas... https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z00000...
If you see an error that reads Provider cannot be found. Ensure that the provider has been installed properly, you
can try opening the file manually and editing its contents to work with your database.
3 of 4 08/02/2020 09:19
Creating a Microsoft Data Link file (UDL) for Connecting to a Databas... https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z00000...
[oledb]
; Everything after this line is an OLE DB initstring
Provider=Microsoft.ACE.OLEDB.12.0;
Data Source=C:\Users\Public\Documents\Database.accdb;
Persist Security Info=False;
How to Create a DSN File to Communicate with an Collaborate with other users in our discussion forums
Access Database in LabVIEW Search the NI Community for a solution
4 of 4 08/02/2020 09:19