Documentation

C and C++ ISAM Programmers Guide

Previous Topic

Next Topic

Transaction Processing On/Off

Transaction processing control can be dynamically enabled and disabled for data and index files. UpdateFileMode() can modify the transaction processing characteristics of a file. By putting ctTRNLOG in the file mode argument of UpdateFileMode(), transaction processing is enabled. By omitting ctTRNLOG in the call to UpdateFileMode(), transaction processing is disabled. However, an index file must be initially created with ctTRNLOG in the file mode to switch back and forth. If an index file is not originally created with ctTRNLOG, it must be rebuilt from scratch to enable ctTRNLOG. One reason to disable ctTRNLOG support might be to run a large batch processing program, after which ctTRNLOG support is re-enabled. The file must be opened exclusively for UpdateFileMode(). The following code is an example of removing ctTRNLOG from the file filno.

if (UpdateFileMode(filno,ctPERMANENT|ctEXCLUSIVE|ctFIXED))

printf("\nFile Mode Error %d",uerr_cod);

Note: This is a low-level function that must be called for each physical file in an ISAM set. It will only update one file at a time.

TOCIndex