TempIIndexXtd Temporary Incremental Index creation. Short Name TMPIIDXX() Type Extended ISAM function Declaration COUNT TempIIndexXtd(pIFIL ifilptr, LONG permmask, pTEXT groupid, pTEXT fileword) Description TempIIndexXtd() behaves the same as PermIIndex() except that the stored file definition is not updated, and you may be sharing the underlying Incremental data file. Each user can have separate and distinct temporary index files. Once the data file, ifilptr -> pfilnam, is closed the temporary index is no longer part of the Incremental ISAM structure. A single call:
The next time the Incremental file is opened, the new indices will NOT be opened and used. However, the temporary file is not deleted. It should be deleted by the application using OpenCtFile() in ctEXCLUSIVE mode, followed by DeleteCtFile(). ifilptr points to a new IFIL structure in which:
permmask is the permission mask assigned to this data file. It is formed by OR-ing the appropriate permission constants. groupid is a pointer to a buffer that contains the group id that this file is to be assigned to. The group id must be valid for the user that is creating the file. If groupid is NULL, the file will be assigned to the default group for the user. fileword is an optional file password. If fileword is NULL then there will be no password for this file. If a password is established, every user will need to use the password to be able to open the file. For more information on user id’s, user passwords, server names, permission masks, group id’s, and file passwords, review “Security and Encryption” in the c-tree Plus Programmer’s Reference Guide. Note: There is the potential for ITIM_ERR errors (160, key value changed between index search and subsequent data record read) when using a temporary index in a multi-user environment. Temporary indexes are visible ONLY to the user who creates them, and therefore any record updates and/or deletions by other users are not applied to the temporary index. The ability to suspend the addition of existing data records to the newly created index creates new indices without inserting keys for the existing records. This allows an application to have indices containing only new entries, speeding access to newer data. Consider the following pseudocode:
See the ctNO_IDX_BUILD description in PermIIndex() for details. Return
See c-tree Plus Error Codes for a complete listing of valid c-tree Plus error values. See also AddRecord(), OpenCtFile(), DeleteCtFile(), PermIIndex(), RebuildIIndex() |
|||||||||||||||||||||||||||