Informix version inside ESQL/C
Posted in 2006
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Hi, How do I find the Informix version inside ESQL/C. is there any query for the same? Regards, Sankaran. --------------------------------- Yahoo! Mail Use Photomail to share photos without annoying attachments.
Sankaran wrote: > Hi, > > How do I find the Informix version inside ESQL/C. is there any query for > the same? RTM: string version_str[80]; EXEC SQL SELECT DBINFO( 'version', 'full' ) INTO :version_string FROM systables WHERE tabid = 1; Other options for the second argument to DBINFO() are available to return the major version, minor version, patch level, etc. Check out the 'expresssions' section in the Guide to SQL Syntax manual. Art S. Kagel
Art S. Kagel wrote: > Sankaran wrote: >> How do I find the Informix version inside ESQL/C. is there any query >> for the same? > > RTM: > > string version_str[80]; > EXEC SQL SELECT DBINFO( 'version', 'full' ) > INTO :version_string > FROM systables > WHERE tabid = 1; > > Other options for the second argument to DBINFO() are available to > return the major version, minor version, patch level, etc. Check out > the 'expresssions' section in the Guide to SQL Syntax manual. Art's answer is accurate for most (if not all) current versions of IDS, provided you are after the version of IDS. It won't necessarily work with OnLine or SE (it probably but not definitively works with XPS), nor with older (meaning unsupported) versions of IDS. If you are after the version of ESQL/C, you have to work a lot harder. I don't try to find the version from within ESQL/C; I have the compilation system tell me which version it is working with. See the Autoconf code distributed with SQLCMD (from the IIUG Software Archive). The acinformix.m4 file is reusable macros for configuring ESQL/C. Which information were you really after? -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2005.02 -- http://dbi.perl.org/