on 09-10-2008 8:38 AM
Hi,
This query is regarding the kind of version checking that an application should do.
Currently I am building my application in MaxDB version of 7.6.05.09, which is the community edition available on the sdn download site currently, this will change to the enterprise edition once we have finalized everything in terms of code and packging etc....
Now when the application is shipped to customer site, what kind of version checking should the application do to ensure that the version of library/kernel/client/sdk it has been built with is consistent with the one that is installed at the customer site.
From what i see SQLDBC exposes the following method for getting version related information.
char * SQLDBC_Environment_getLibraryVersion(SQLDBC_Environment* hdl);
char *getSDKVersion();
SQLDBC_Int4 SQLDBC_Statement_getKernelVersion(SQLDBC_Statement* hdl); (Note: Wondering why should a handle to SQLDBC_Statement be needed to find the Kernel version)
Just to give you little more hint of what i am talking about, for MySQL database we use the functions
mysql_get_client_version and mysql_get_server_version and check that the values returned by these functions are less than the value which was used at build time.
Regards
Raja
Hello Raja
From the documentation:
const char* SQLDBC::SQLDBC_Environment::getLibraryVersion ()
Returns the version of used SQLDBC runtime.
This is the version of the used SQLDBC library. The version of the loaded
runtime may differ from the version inidacted in the used header. It is our
aim that newer versions of the runtime will run with old applications without
the need to be re-compiling.
Therefore, for compatibility checks, use getLibraryVersion.
getKernelVersion is also available from the connection:
SQLDBC_Connection::getKernelVersion()
Regards Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thomas,
Thanks for the very valuable information.
So, just to reconfirm the understanding. The compile time version can be the value mentioned in SQLDBC_C.h file in the following line, i.e., 70603 :
#define SQLDBC_CHeaderVersion "SQLDBC_C.H 7.6.3 BUILD 015-121-173-107"
A check should be made during runtime to ensure that '70603 should be always less than or equal to the value returned by the call to SQLDBC_Environment_getLibraryVersion().
Please confirm this. Also i am thinking if it is necessary to do a similar check for the KernelVersion just to ensure that the application is not being run in kernel version lower than what it was tested for. What do you say ?
Regards
Raja
In way yes. I am trying to protect my application from giving undiagnosable errors when it runs into SQLDBC library which are of lower version the one in which it was compiled. For example if i compile with 7.6.3 and then application is run on SQLDBC library version say 7.6.0 then my application should throw a error and come out instead of running and later running into difficult problems.
Same way for the server version also.
Regards
Raj
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.