Returns the version information for the FairCom DB SQL database engine.
Result Set Fields (6)
VERSION VARCHAR(40)
VER_MAJOR INTEGER
VER_MINOR INTEGER
VER_REVISION INTEGER
BUILD_DATE VARCHAR(14)
VER_MINI INTEGER
Example 1: Using ISQL
call fc_get_server_version();
VERSION VER_MAJOR VER_MINOR VER_REVISION BUILD_DATE VER_MINI
------- --------- --------- ------------ ---------- --------
10.0.1.60592(Build-121011) 10 0 60592 121011 1
Example 2: Using DSQL
The following code can be added to DSQL Tutorial 1 to call this function:
printf("\tGet server version info...\n");
pCTSQLCURSOR hCursor = NULL;
CTSQLCHAR CTVersion[64];
CTSQLCHAR CTMajor[64];
rc = ctsqlPrepare(hCmd, "CALL fc_get_server_version()");
if (rc != CTSQLRET_OK)
Handle_Error("fc_get_server_version() Prepare");
rc = ctsqlExecute(hCmd, &hCursor);
if (rc != CTSQLRET_OK)
Handle_Error("fc_get_server_version() Execute");
/* fetch and display each individual record */
while ((rc = ctsqlNext(hCursor)) == CTSQLRET_OK)
{
ctsqlGetChar(hCursor, 0, CTVersion);
ctsqlGetChar(hCursor, 1, CTMajor);
printf("\n\t\t%s - %s\n", CTMajor, CTVersion);
}
ctsqlFreeCursor(hCursor);
The resulting output will appear as follows (notice the version number displayed at the end of INIT):