File Mode |
Value |
Explanation |
---|---|---|
NORMAL_OPEN |
0 |
Use this mode if none of the other open modes apply. |
EXCLUSIVE_OPEN |
1 |
This mode opens the table as exclusive, so only one user may open the table. If another user already has the file open using any mode, this user cannot open the table as EXCLUSIVE_OPEN. Once a user has a table opened as EXCLUSIVE_OPEN, no other user can open it. Reads and writes are cached for index files opened with this file mode since there are no integrity issues with only one process in the file. |
PERMANENT_OPEN |
2 |
Many operating systems and/or C compiler run-time libraries limit the number of files that can be opened at one time. A permanent file open causes the file to be opened and stay open until the program executes a file close. A non-permanent file open causes the table data and index files to be opened, but allows them to be transparently closed and reopened in order to allow other data and index files to be used. When it is necessary for a data and index file to be temporarily closed, c-tree Plus selects the least recently used file. This file will remain closed until it is next used, at which time it will be automatically reopened. This strategy causes c-tree Plus to use all available file descriptors. |
CORRUPT_OPEN |
4 |
Opens a table that appears corrupt when opened using NORMAL_OPEN (FCRP_ERR (14)). This occurs when a process exits without properly closing, via CTTable.Close(), a table it has modified. Rebuild the file using the RebuildIFile() function. |
CHECKLOCK_OPEN |
8 |
Tables opened with this mode require a record lock before a record can be updated. If a lock is not obtained, the error code DADV_ERR (57) is returned. |
CHECKREAD_OPEN |
16 |
Tables opened with this mode require a record lock as records are read. Obtain at least a read lock on a record before it can be read, otherwise the function will return error code DADV_ERR (57). |