Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Client version information
"Patrick Maurice" <adress_at_nowhere> wrote
> Is there a mean for a application to read/test the version of the Oracle
> network client used on the machine where it runs ?
What db API are you using? OCI? Thin JDBC? BDE? dbExpress? ADO? ODBC? Some of these may have a version method/property for the vendor library (DLL or SO) being used.
You also failed to mention your o/s, so I assume that it is Windows. In that case the vendor lib is very likely the OCI.DLL. ORACLE_HOME should be set in the environment - or accessible via the Registry (likely a better and safer option).
Thus you check if %ORACLE_HOME%/bin/oci.dll exists. Then get the version from the file header using the following Win32 API call.
-- LPSTR GetVersionOfFile(LPSTR szFile, LPSTR szBuf, int cbBuf); GetVersionOfFile determines the version of the specified file. Argument szFile Specifies the path and name of the file. szBuff Specifies the buffer you are providing for the storage of the typeface name. cbBuff Specifies the size of the buffer you are providing. Return Value The return value is a string in the format N.N.N.N, where each N is an integer. --- BillyReceived on Thu Nov 13 2003 - 06:04:54 CST
![]() |
![]() |