Oracle ODBC Connection & Key Learnings

Home / Blogs / Oracle ODBC Connection & Key Learnings

Using an Oracle database from LabVIEW is quite jargon journey.

From Instant-Client to ODBC, OLE DB, SQL Developer etc, difference between ODBC, ODAC, OLE DB, ADO etc, all can lead one to confusion easily. NI has tried to explain well on this document, it’s still not very lucid in other sources like stackoverflow.

I’m not confronting here to clarify all those. I found some few key learning are worth sharing.

  1. Windows has implicit classification of files between 32bit and 64bit. If you create a file using C:\Windows\SysWOW64\cmd.exe, then it creates pure 32-bit file. Look at this link for more details.
  2. LabVIEW connects to the database provider purely based on the LabVIEW bitness. If you use 32-bit LabVIEW, then use the 32-bit data provider and UDL file.
  3. Never get confused with Oracle Instant Client with ODAC. For most windows application you will need ODAC . ODAC package has Oracle Instant Client and Oracle Provider for OLE DB. Usually you don’t need ODBC installation for Windows 10. Use correct bitness for ODAC too
    32-bit ODAC
    64-bit ODAC
  4. Create the UDL file using 32-bit in order to use with 32-bit LabVIEW. If you link UDL file from 64-bit then it mayn’t work with 32-bit application.

How to create 32-bit UDL file in 64-bit Windows?

  1. Open 32-bit command prompt from SysWOW64 windows folder.
 C:\Windows\SysWoW64\cmd.exe 
32-Bit command prompt opened using C:\Windows\SysWoW64\cmd.exe
  • SysWOW64 usually has 32 bit application.
  • System32 folder contains 64-bit application.

2. Open notepad from the 32-bit cmd prompt and create an empty text file using notepad command

notepad test_file.udl

3. Rename that text file extension to .udl file and then open that file from the same 32-bit cmd prompt to open the Data Link Properties dialog.

You can find below the providers listed are drastically different from my 32-bit and 64-bit UDL file.

Data Link Properties from 32-Bit UDL File
Data Link Properties from 64-Bit UDL File

Ajay is a professional developer and architect of LabVIEW applications with extreme interest in getting the hardware connected to LabVIEW and automate the stuffs.  He is also a good mentor for the various interns in his career.  He is ready to help the people in techie roles.

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: