EnableCtResource Enable Resources in a file created without resources enabled. Short Name ENARES() Type Low-level file function Declaration COUNT EnableCtResource(COUNT filno) Description When creating a file with CreateISAM(), CreateIFile(), CreateIndexFile(), or CreateDataFile(), resources can be disabled for that file using the ctDISABLERES file mode. To later use resources with that file, call EnableCtResource() to enable that feature before calling AddCtResource(), PutIFIL(), or PutDODA(). The file must already be open, and it must be opened with a file lock mode of ctEXCLUSIVE. Otherwise, you will receive an error. filno is the file number for the affected file. Return
See c-tree Plus Error Codes for a complete listing of valid c-tree Plus error values. Example pIFIL ifilptr;
printf("\nCannot open file, error %d",isam_err):
else {
if (EnableCtResource(ifilptr->tfilno)) printf("\nCannot enable resource,err%d", uerr_cod);
else (PutIFIL(ifilptr)) printf("\nCannot add resource,err%d", isam_err);
CloseFile(ifilptr->tfilno,0); } See also AddCtResource(), CreateISAM(), CreateIFile(), CreateIndexFile(), CreateDataFile(), PutDODA(), PutIFile() |
|||||||||||||||