OCI Oracle from Visual Studio 2017 C++

Hello,

Can anyone please, maybe someone has already tried to do this - the most basic example of how to work with OCI from VS2017?

All that was enough for me was to download Instant Client Oracle for Windows:
https://www.oracle.com/database/technologies/instant-client/downloads.html

from there I took 4 necessary dll files:
-oci.dll
-oraociei19.dll
-orannzsbb19.dll
-oraons.dll

At least as I understood from this instruction:
https://docs.oracle.com/en/database/oracle/oracle-database/19/lnoci/instant-client.html

And then in Visual Studio 2017, using the winapi function, LoadLibraryW pointed to the path to them:

HINSTANCE hMyDLL_oci = LoadLibraryW(L"D://Oracle distibute//Oracle_DLL//oci.dll");
HINSTANCE hMyDLL_ociw32 = LoadLibraryW(L"D://Oracle distibute//Oracle_DLL//ociw32.dll");
HINSTANCE hMyDLL_oraociei1 = LoadLibraryW(L"D://Oracle distibute//Oracle_DLL//oraociei19.dll");
HINSTANCE hMyDLL_oraons = LoadLibraryW(L"D://Oracle distibute//Oracle_DLL//oraons.dll");

And what to do next, how to at least establish a connection to the database server, enter UserName, Password, HostName - I can’t understand at all.
Last edited on
According to the second link the SDK you can download contains 'demonstration programs'. Just take a look at them?
Their examples are designed so that the Nazis do not figure out how to use their examples. :(
I'm not sure why you're using LoadLibrary. Why not just link the .lib?
Because Oracle's OCI for windows only provides a dynamic link library.
Oracle also has a downloadable OCI SDK that include .lib files you could use in your projects to expose the DLL's interface(s) without the need for LoadLibrary.
Topic archived. No new replies allowed.