ReadData Read fixed-length data record. Short Name REDREC() Type Low-level data file function Declaration COUNT ReadData(COUNT datno, LONG recbyt, pVOID recptr) Description ReadData() reads the data record at byte position recbyt for data file datno into the buffer area pointed to by recptr. If datno refers to a variable-length file, ReadData() reads only the fixed-length portion into the buffer. Use ReReadVRecord() to read an entire variable-length record. Return
See c-tree Plus Error Codes for a complete listing of valid c-tree Plus error values. Example COUNT datno,keyno; TEXT recptr[1024]; LONG part_number;
if (ReadData(datno, GetKey(keyno, &part_number), recptr)) printf("\nCould not retrieve record for part #%ld", part_number);
Limitations 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(), ReReadVRecord(), ReadIsamData(), WriteData() |
||||||||||||||||||||||||