-1

oracle odbc driver configuration: Data source Name: mxx TNS Service Name: XE User ID: c##mcc password: orcl

So how to write database tools open connection information in the labview 2016 32bit?

1 Answers1

0

While you should write a bit more about what you have and what you want, you should not share the login credentials with the world, should you?

ODBC connection

So, you configured an ODBC connection in Windows? Then, this connection has a name used to display it. In LabVIEW with database connectivity kit (included in pro version, or as addon), use the Connect VI from the Connectivity > Database palette, and wire a string with the name of the connection to the top left terminal. The VI is polymorph, and expects a path there by default. Also, you want to wire your user/password to that VI.

Now, here is the problem:
The Windows tool you use to create the ODBC connection is C:\Windows\System32\Odbcad32.exe. If you have a 64bit Windows, this tool manages 64bit ODBC connections, which are invisible to 32bit applications like your LabVIEW! Use C:\Windows\SysWOW64\Odbcad32.exe to create a 32bit ODBC connection, which can then be used with 32bit LabVIEW! Also: Note that you might need to install the 32bit ODBC driver for oracle databases.

Keep in mind you have to do this on each machine you want to run your code on.

Alternative: UDL file

Create a new file with extension *.udl. Doubleclick it, and a dialog appears where you can setup your database connection. Save it, and wire the path of the file to the Connect VI. (Or: The UDL file contains data in INI file format. Open it with a text editor, copy the long line, and paste it into a text constant, which then is wired to the Connect VI)

This method also needs the 32bit drivers for your database installed, but setup of the connection itself is done in a simple text file, which makes it much more flexible.

sweber
  • 2,916
  • 2
  • 15
  • 22