One of my project needs to save test results to different Access database files for different units to be tested. The database files’ name is automatic generated based on UUT’s serial number. Currently, I’m using the LabVIEW Database Connectivity Toolset, and the default method to access a database file by it is UDL file. The UDL file contains only one static database file and it is quite hard to change it programmly without manually select a database file and click the confirm button. And it will be a nightmare to create each UDL file for each UUT before the test is taken.
To change the UDL file’s content in LabVIEW programmly is not easy too. Because UDL file is unicode-formatted, and LabVIEW is quite limited in support to unicode. I had tried several ways to change the database file name in UDL file and save the UDL file to hard disk. And when I open the changed UDL again, I got “File corrupted” message. It seemed that it is not a good way. Read more…
LabVIEW
Access, Database Connectivity Toolset, LabVIEW, UDL file
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. Read more…
LabVIEW
Access, database, LabVIEW, UDL
There are a couple of different methods to communicate with Access in LabVIEW, and some are more difficult than others. You can use ActiveX Automation to open Microsoft Access and control many aspects of the Access Application. For actual database manipulation however, the Access automation classes rely upon the Microsoft DAO (Data Access Object) and/or ADO (ActiveX Data Object) classes. These classes can be used independently or through the Access automation classes to read and write data into an Access database. These classes can be difficult to use and may require a fair amount of SQL knowledge to accomplish a complicated task.
For more information about the Microsoft Access automation classes, DAO or ADO classes refer to the Microsoft website and Developer Network. Read more…
LabVIEW
Access, database, LabVIEW