Page 1 of 1

Range check error with mutiple Oracle clients.

Posted: Thu 14 Jan 2010 08:56
by stjtaylor
With 2 Oracle Clients installed (10.2.0.1 and 11.1.0) and 10.2 as the default ODAC is producing a "Range Check error" from within the VersionStrToWord function after the incorrect version is returned from GetOCIClientVersion.
Reproducing this may take some experimenting with default Oracle client and changing the selected client in the Oracle Universal Installer.
The error stops ODAC from initializing the oci and obviously connecting.

We were able to fix this by declaring the _OCIClientVersion method (in OraCall) as a function with a sword return value.
The value returned from OCIClientVersion() can then be checked so GetOCIClientVersion() doesn't return an invalid value.

Let me know if you need more information, or have a better\different solution.
Thanks,
Steve.

Posted: Thu 14 Jan 2010 09:37
by Plash
We will add this fix to the next ODAC build.

Another Range check error

Posted: Sun 24 Jan 2010 22:34
by stjtaylor
Hi,
Thanks for the quick response to the last issue.

We found another range check problem.
With multiple clients installed, if one of the clients become invalid eg. if the folder is deleted or the BIN folder is renamed then the newly exposed method TOraServerEnumerator.GetTNSFileName will produce a Range Check error.

Code is:
if (FHomeName = '') and (OracleHomeCount > 0) and then
FileName := AddPath(RegIniFile.ReadString(sOraHomeKey +
OracleHomeKeys[DefaultOracleHome], sTnsAdmin, ''), sTnsNames)

DefaultOracleHome is -1 and produces a Range Check error.
If a check for this is added it works ok.

Thanks,
Steve.

Posted: Mon 25 Jan 2010 08:17
by Plash
We will add this fix to the next ODAC build.

Posted: Fri 29 Jan 2010 00:57
by stjtaylor
I have just downloaded the latest update from 27th Jan.

The first error that required a change to the OCI call is still causing a problem.
It appears that the return value for OCIClientVersion is a non-zero value for success and zero for an unsuccessful call.

Can you take a closer look at the return value please?

Thanks.