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: 

ODBC data source creation using App builder/ installer??

Is it possible to creat the DSN entries for database use within LabVIEW (lv8)??
 
Basically I have 3 Database files and When I deploy my App, I manually enter each DSN in the ODBC Data Source manager, is there a way to have this done during my App install?
 
If so, how do I go about adding it to my installer?
Jeff D.

Certified Architect LabVIEW Champion DQMH Framework

Message 1 of 6
(2,704 Views)

I have always used .udl files instead of ODBC on installations.  In your installer you can add the .udl file and point your database connect to this file.  I can send you an example if you want.

Steve

Message 2 of 6
(2,701 Views)

I am using UDL, but don't you also need to have the DSN set up as well?

 

Jeff D.

Certified Architect LabVIEW Champion DQMH Framework

Message 3 of 6
(2,697 Views)
No, the UDL file contains all the information that a DSN entry in ODBC has.
Message 4 of 6
(2,693 Views)

Here is a zip file that contains a VI, UDL file and a database file.  The file opens the database connection using the path to the UDL file.  Now when you install these they have to go to specific locations otherwise the UDL may not point to the database.  One good thing about a UDL file is that you can edit from LabVIEW like a text file if disk locations do change.  Put these three file in "C:\Temp" and you can see what it does.  The VI runs a simple SQL on a serial number to see what the next run number would be.

Hope this helps,

Steve

Message 5 of 6
(2,692 Views)
OH I see, you used the Jet 4.0 driver and then you can just specify a location.. Cool. I will try that out
Jeff D.

Certified Architect LabVIEW Champion DQMH Framework

0 Kudos
Message 6 of 6
(2,684 Views)