ctUPDICU
ctUPDATICU() allows a user to update the Unicode version stored in the resource of their files.
Declaration
NINT ctUpdateICUversion(pTEXT filnam,pTEXT fileword)
NINT ctUPDATICU(pTEXT filnam,pTEXT fileword)
Type
ISAM function
Description
ctUPDATICU() takes the name of a data file containing IFIL resources and an optional password and attempts to open the file and associated indexes exclusively, skipping the ICU version check. If the open succeeds, then the data file and associated indexes have their UNICODE resource version changed to agree with the current ICU library version, and indexes that reference the ICU resources are marked for rebuild.
Return Values
ctUPDATICU() returns NO_ERROR (0) if the files are opened successfully, and no ICU version mismatch is found.
Value |
Symbolic Constant |
Explanation |
---|---|---|
-828 |
ICUV_COD |
One or more ICU resources had versions updated, but no index was found that used ICU segments. |
-829 |
ICUV_REB |
ICU version updates, and one or more indices marked for rebuild. |
See FairCom DB Error Codes for a complete listing of valid FairCom DB error values.
Example
#include ctreep.h
NINT rc = 0;
char[255] filename;
strncpy(filename, "mydata.dat", 10);
/* Initialize FairCom DB */
rc = (InitISAMXtd(16, 16, 16, 16, 0, "ADMIN", "ADMIN", "FAIRCOMS"))
if (rc)
printf("ctree failed to initialize with error %d", rc);
/* block the data file mydata.dat and associated indexes */
rc = ctUPDTICU(filename, NULL);
if (rc) {
printf("ctUPDTICU returned with with condition %d", filename, rc);
/* If ICUV_REB, then the indexes require rebuild */
if (ICUV_REB == rc)
printf("One or more indexes marked for rebuild.\n");
}
CloseISAM();
exit(0);