07-05-2019 03:48 AM
Hi,
have a new PC and my Labview program doesn't work in this new environment. The program should connect to a Oracle database and I get the following error message.
SQL Error
NI_Database_API.lvlib:DB Tools Open Connec (String).vi->NI_Database_API.lvlib:DB Tools Open Connec (Path).vi->Gui SQL.vi->Gui InputInfo.vi->Gui Config.vi->Gui TopConfig.vi->Gui Loader.vi->Main Program.vi<ERR>ADO Error: 0x80040154
Exception occured in Microsoft OLE DB Service Components: Class not registered in NI_Database_API.lvlib:DB Tools Open Connec (String).vi->NI_Database_API.lvlib:DB Tools Open Connec (Path).vi->Gui SQL.vi->Gui InputInfo.vi->Gui Config.vi->Gui TopConfig.vi->Gui Loader.vi->Main Program.vi
Understand that something is not registered in my new PC, but what? Do I have to do something with the NI_Database_API.lvlib to get it to work?
07-05-2019 05:08 AM
You should give more context in the error message than just the call chain. We don't even see the error code, not to speak about the ADO DB generated error message.
Most likely you need to create an according ODBC DSN entry in the ODBC manager and you need to make sure to start the ODBC manager with the same bitness as your LabVIEW program. On 64-bit Windows the ODBC manager started up from the start menu is the 64-bit version but your LabVIEW program is most likely a 32-bit application.
To startup the 32-bit version you need to go to C:\Windows\SysWow64 and start the odcbad32.exe. There is also a possibility that the programmer who wrote that application passes the entire connection string that defines the driver to use and any extra settings directly without the need for a DSN entry but then you would need to know what driver he is trying to use as there are several different drivers for connection to Oracle DBs. One is from Microsoft itself and one obviously from Oracle and you need to have the one installed that your application tries to use. Because of that it is better to configure a DSN on the system and just use that alone. Obviously you would need to know the name of the DSN that your application tries to do, and create it in the ODBC Administrator exactly like that too.
07-05-2019 05:57 AM
Thought
Error: 0x80040154
Exception occured in Microsoft OLE DB Service Components: Class not registered in NI_Database_API.lvlib
was the error code. Don't know what other error messages I will find.
I'm running 32-bit and using a udl-file to define the data source and username/Password.
The provider I'm using is Oracle Provider for OLE DB.