ReleaseData Release fixed-length data record for reuse. Short Name RETREC() Type Low-level data file function Declaration COUNT ReleaseData(COUNT datno, LONG recbyt) Description ReleaseData() adds record position recbyt to the chain of deleted records for fixed-length file datno. ReleaseData() should be called when a data record is no longer needed so that the space can be reused. Records returned by ReleaseData() are reused by NewData() before the data file is extended. ReleaseData() is automatically called by DeleteRecord(). Return
See c-tree Plus Error Codes for a complete listing of valid c-tree Plus error values. Example COUNT keyno,datno; LONG recbyt; pTEXT target;
if (DeleteKey(keyno,target,recbyt) == NO_ERROR) if (ReleaseData(datno,recbyt) == NO_ERROR) printf("\nSUCCESS.");
Limitations ReleaseData() writes an 0xff byte and a 4-byte data record position starting at the first byte of the returned data record. Therefore, even if you only write ASCII information into the data records, ReleaseData() will place binary information into the beginning of deleted records. The recbyt parameter in this function is a 4-byte value capable of addressing at most 4 gigabytes. If your application supports HUGE files (greater than 4 gigabytes), you must use the ctSetHgh() and ctGetHgh() functions to set or get the high order 4 bytes of the file offset. See also ctSetHgh(), ctGetHgh(), DeleteRecord(), LockCtData(), NewData() |
||||||||||||||||||||||||