Version 9.2.7 and Can't initialize OCI error (-1)
Version 9.2.7 and Can't initialize OCI error (-1)
As mentioned in my post under the "OCI function is not linked" thread, I still get the above error even with the 9.2.7 fixes. This is with the Oracle 10.1.0.4.0 client. I've verified that I can use it with an earlier version of my program, which was built with an older version of ODAC (however I'm not positive what version it was, but it was before the new Oracle Home's related changes.) I have no problems with newer Oracle Clients. Thanks for any help.
Re: Version 9.2.7 and Can't initialize OCI error (-1)
I just wanted to add that this test is done with the oldest (10.1) Oracle Instant Client version that Oracle makes available on its downloads page. I've verified that the home works and can connect both with SQLPlus and with an older version of ODAC, but gives the "Can not initialize OCI (-1)" error with Odac 9.2.7.
Re: Version 9.2.7 and Can't initialize OCI error (-1)
hello,
We cannot reproduce the problem on the latest ODAC version 9.2.7 and Oracle instant Client 10.1.0.4.0. After unpacking the archive, adding the following record to the registry and adding the path to the client to the PATH variable - connection is established correctly:
Try to reinstall ODAC with the /force option.
We cannot reproduce the problem on the latest ODAC version 9.2.7 and Oracle instant Client 10.1.0.4.0. After unpacking the archive, adding the following record to the registry and adding the path to the client to the PATH variable - connection is established correctly:
Code: Select all
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_OraClient10g_home1]
"ORACLE_HOME"="D:\\instantclient10_1"
"ORACLE_HOME_NAME"="OraClient10g_home1"
"ORACLE_GROUP_NAME"="Oracle - OraClient10g_home1"
"NLS_LANG"="RUSSIAN_CIS.CL8MSWIN1251"
"ORACLE_HOME_KEY"="SOFTWARE\\ORACLE\\KEY_OraClient10g_home1"
Try to reinstall ODAC with the /force option.
Re: Version 9.2.7 and Can't initialize OCI error (-1)
Thanks for the suggestion as that allowed me to figure out what was wrong. It turns out you've changed the LoadLibrary calls in OraCall to not use LOAD_WITH_ALTERED_SEARCH_PATH in some cases. It appears that Oracle Clients newer than 10 can handle finding their own dlls without that, but the older client can't (when the client is not in the system path.) I'd be interested as to why you'd ever not use LOAD_WITH_ALTERED_SEARCH_PATH? It's possible that it's just a bug as I see that you are checking to see if the dll contains a path first (and then choosing the wrong option?) In any case, I've got it fixed, so thanks for your help.
Re: Version 9.2.7 and Can't initialize OCI error (-1)
LOAD_WITH_ALTERED_SEARCH_PATH is used in case if it is impossible to find the record about the Oracle client and define where it is installed. We will investigate the behavior of the old clients and add the required changes.
Re: Version 9.2.7 and Can't initialize OCI error (-1)
Thanks for the explanation. Note that the issue only comes up if the client is not in the system path, so it's a fairly minor issue.
-Mark
-Mark
Re: Version 9.2.7 and Can't initialize OCI error (-1)
As I wrote earlier, we will consider the possibility to change this behavior