Closed hewittzgh closed 2 years ago
PS: I install the ocilib 4.7.3 package through NuGet package manager. Of course, I had tested 4.7.2/4.7.1/4.7.0 version and tried to install it by configure the vs project manually, but it never worked.
Hi,
Have you install an oracle client or downloaded an instant client package? If not, there error is normal. OCILIB relies on oracle OCI client libraries to interact with Oracle databases.
Regards,
Vincent
Thanks! I will try. If it works, I will close the issue.
@vrogier Hi! I have solved the initialization problem. But when I connect the oracle server, I find the OCI_ConnectionCreate
api return NULL. My OCI client library version is 11.2.0.4.0 basic. Do you known what causes this problem? Thank you!
My code:
oracle_cn = OCI_ConnectionCreate("<ip>:<port>", "<username>", "<password>", OCI_SESSION_DEFAULT);
The first parameter can be:
You can check oracle documentation for more details.
In your example, the easy connect string is not correct.
Easy connect string is host:port/servicename.
Regards,
Vincent
Hi, Any news ?
Closing the issue as no news from OP and given information provided, invalid connection string was used.
@vrogier Hi! I am trying to use ocilib. my environment is win11, vs2019. my
C
code is as follows:The function "OCI_Initialize" can not work. I get
OCI_ErrorGetType
andOCI_ERR_LOADING_SHARED_LIB
error. I tried the method in the link, but I couldn't solve it. Can you give me some suggestions?