OraCall.OCIVersion?

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
paulzip
Posts: 37
Joined: Mon 02 Oct 2006 13:13

OraCall.OCIVersion?

Post by paulzip » Thu 14 Jan 2016 10:07

ODAC : 9.6.21

In previous earlier versions of ODAC, there were routines for reading the OCI version

OraCall.OCIVersion and OraCall.OCIVersionSt

These no longer work. Where are these routines now or how do you achieve their equivalent?

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: OraCall.OCIVersion?

Post by AlexP » Thu 14 Jan 2016 10:25

Hello,

This data may be retrieved from the TOracleHome class:

Code: Select all

  OraSession.Home.OCIVersionSt
  OraSession.Home.OCIVersion

jjeffman
Posts: 84
Joined: Tue 09 Nov 2004 12:22
Location: Porto Alegre-Rio Grande do Sul - Brazil

Re: OraCall.OCIVersion?

Post by jjeffman » Thu 11 Feb 2016 16:42

Hello,

In the ODAC 9.6.22 Help file the "Home" property of TOraSession is marked as deprecated and Not Supported.

This property seems to be considered as not important by the Devart developer team, as its interface was successively changed without any care with active applications.

How can I get the OCIVersionSt value using the new TOraSession v 9.6.22 structure, without using any deprecated property?

jjeffman
Posts: 84
Joined: Tue 09 Nov 2004 12:22
Location: Porto Alegre-Rio Grande do Sul - Brazil

Re: OraCall.OCIVersion?

Post by jjeffman » Thu 11 Feb 2016 17:32

Hello,

A workaround can be made by running the sql bellow:

Code: Select all

SELECT
(SELECT
  DISTINCT CLIENT_VERSION
FROM
  v$session_connect_info
WHERE
 sid = sys_context('USERENV', 'SID')) AS CLIENT_VERSION,
(SELECT SUBSTR(banner, INSTR(banner,'Release')+8, INSTR(banner,'-') - (INSTR(banner,'Release')+9)) 
FROM V$VERSION
WHERE banner LIKE '%Database%' ) AS dbversion
FROM sys.dual
I do not know if it works on versions of Oracle database bellow 10g, but it is a good solution to become independent of ODAC implementations.

Best regards,

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: OraCall.OCIVersion?

Post by AlexP » Fri 12 Feb 2016 10:25

The variables in the OraCall method are obsolete. We will correct this help section.

We detect the client version not using a query, but using Oracle API OCIClientVersion.

jjeffman
Posts: 84
Joined: Tue 09 Nov 2004 12:22
Location: Porto Alegre-Rio Grande do Sul - Brazil

Re: OraCall.OCIVersion?

Post by jjeffman » Thu 17 Mar 2016 17:33

Hello Alex,

Is there any way of getting the OCIClientVersion using TOraSession properties and methods on VCL ODAC version 9.6.22 ?

The query to Oracle database I have suggested only works on Oracle database of version 10g or greater.

Thank you very much.
Best regards.

Jayme Jeffman

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: OraCall.OCIVersion?

Post by AlexP » Fri 18 Mar 2016 09:59

You can retrieve the client version in the following way:

Code: Select all

OraSession1.Home.OCIVersionSt //string
OraSession1.Home.OCIVersion    //integer

Post Reply