12-10-2013 08:10 AM
Hi,
Can some one help me how to programmatically create UDL file and DSN file from Labview environment for windows database applications.
12-10-2013 09:13 AM
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).