From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to programatically create UDL and DSN files from Labview

Hi,

 

Can some one help me how to programmatically create UDL file and DSN file from Labview environment for windows database applications.

0 Kudos
Message 1 of 2
(2,820 Views)

A UDL is just a text file with the udl file extension. So, you can use Write to Text File. The example udl file that comes with the Database Connectivity Toolkit looks like:

 

[oledb]
; Everything after this line is an OLE DB initstring
Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=C:\Program Files (x86)\National Instruments\LabVIEW 2013\examples\database\LabVIEW.mdb

 

The connection string is for an jet database (Access). The string for a more robust database such as MySQL or SQL Server is a bit different. I would suggest that you manually create a udl to see the format. You have not specified what it is you want to dynamically write to the udl file (db name, user, password, etc).

0 Kudos
Message 2 of 2
(2,803 Views)