DB_WriteRecord

DB_WriteRecord writes a record to the disk. The record is written as the recordnum-th record of recordtype. If the record number written to is above the maximum number of records of that type, the record is written to the next available spot, not to that absolute record number. The record is written to the returned number. As an example, writing data record 10 to a database that contains only 3 data records will write the information to record number 3 (0-2 is three records, 3 is the next record), and the function will return 3.

If viewptindex is a NULL pointer, no viewpoint information is returned. Otherwise, the integer pointed to by viewptindex is set to the viewptindex of that record. The viewpoint index of the record is the index into the viewpoint table where the record was inserted. The insertion point is affected by the current filter and sort. If the record does not belong in the current viewpoint, the viewpoint index returned is DB_VPABSENT.

The record is marked as modified for reconciliation, and the selection state is cleared.