The basic theory of operation is that each table consists of a number of fields. The table structure holds within it one row of data. Each getdbtblrow() call will overwrite that data, and each putdbtblrow() call writes that data out. A call to dbnametofld() returns a pointer to a structure containing information about one field.
Each field has a certain amount of information associated with it. A call to getfld() returns a pointer to the data storage area of the field. Subsequent calls to getdbtblrow() or putfld() may overwrite this area, or create a new area. The previous data is lost, so if you want to keep the data around longer you need to make a copy of it.
Putfld() takes a pointer to the data to be written out. This data must remain valid until putdbtblrow() is called. It is the responsibility of the calling program to free the data if needed.