Home | Previous Page | Next Page   Function Descriptions >

mi_version_comparison( )

The mi_version_comparison( ) function compares the version of two instances of Dynamic Server.

Syntax

mi_integer mi_version_comparison(s1, s2)
   mi_char1 *s1;
   mi_char *s2;
s1
is the starting string address of the version number to compare.
s2
is the ending string address of the version number to compare.
Valid in Client LIBMI Application? Valid in User-Defined Routine?
No Yes

Usage

The mi_version_comparison( ) function compares the version for the major, minor, and interim version numbers of two database servers. For example, for IBM Informix Dynamic Server 9.40.UC6, the major version is 9, the minor version is 40, and the interim number is 6. If the interim number is omitted in one of the strings, then both strings will only be compared for only the major and minor release numbers.

Important:
You should always use the mi_version_comparison( ) function instead of using a string comparison.

Return Values

MI_ERROR (-1)
indicates an error in the strings that are passed.
2
indicates that the value of s1 is greater than the value of s2.
0
indicates that the values of s1 and s2 are equal.
-2
indicates that the value of s1 is less than the value of s2.

Related Topics

See also the description of mi_server_library_version( ).

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]