F.21 CloseISAM
Close all ISAM files.
Short Name
CLISAM
TYPE
ISAM function
DECLARATION
COUNT CloseISAM()DESCRIPTION
CloseISAM closes all the files opened in the current c-tree Plus session and frees all memory allocated by that session. If CloseISAM encounters difficulty closing a file, it tries to close the remaining files. The error code returned by CloseISAM pertains to the first file that could not be closed.
Before a second c-tree Plus session is started with a call to InitCTree, CreateISAM, InitISAM or OpenISAM can be made, CloseISAM must be called.
RETURN
Value Symbolic Constant Explanation 0 NO_ERROR Successful close of ISAM files. 22 FNUM_ERR File number out of range. 24 FCLS_ERR Could not close file number isam_fil.See Appendix A "c-tree Plus Error Codes" of the c-tree Plus Programmer's Reference Guide for a complete listing of valid c-tree Plus error values.
EXAMPLE
extern IFIL myfile;COUNT retval;if (retval = InitISAM(6,7,4))printf("\nCould not close files. Error %d.", retval);else {if (OpenIFile(&myfile))printf("\nCould not open files.");if (CloseISAM())printf("\nCould not close ISAM.");}LIMITATION
CloseISAM closes all ISAM files including those opened or created with the incremental ISAM functions.
SEE ALSO
OpenISAM, OpenIFile, CreateISAM, CreateIFile, InitISAM, and CloseIFile.
|
FairCom Corporation www.faircom.com |