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.
- 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.
- 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.
- 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
- 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?
- Open 32-bit command prompt from SysWOW64 windows folder.
- 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
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.
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.