LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Edit udl file in labview

Solved!
Go to solution
I am new to Labview and database connections, and I seem to have everything working correctly between Labview and Mysql but I would like to open an existing UDL file and edit it in Labview using the built in windows dialog box.  I have looked in the forum but can't seem to find a solution, any ideas? Thanks   
0 Kudos
Message 1 of 5
(3,472 Views)

secr1973 wrote:
I have looked in the forum but can't seem to find a solution, any ideas? Thanks   

I found this example by simply searching for "UDL".

0 Kudos
Message 2 of 5
(3,469 Views)
Well, I don't know how I missed that.  Thanks.  I got it to work, but it doesn't seem to load the udl file that I want.  Does that look like a good way to do the connection string?
Download All
0 Kudos
Message 3 of 5
(3,452 Views)
Solution
Accepted by topic author secr1973

That VI was just an example that opened the dialog with a blank connection. In that example, after you configured the connection with the dialog and dismissed it, the dialog would return the resultant connection object which was used to open a connection. If you want to pre-load a connection object then you need to do that before, and pass it to the PromptEdit method. For example see attached image.

 

 

A .udl file is just a text file, so you can simply read the connection string using the standard File I/O functions in LabVIEW, and then write it back out again after the dialog is dismissed. 

P.S. If you need connection strings, go here: http://www.connectionstrings.com.
Message Edited by smercurio_fc on 03-09-2009 03:11 PM
Message 4 of 5
(3,432 Views)
I understand, Thanks.
0 Kudos
Message 5 of 5
(3,419 Views)