Back to index
This document records a few common mistakes made by people using OOFILE. Over time, we will try to minimize them with OOF_Debug tests:
The macro CLASS_TABLE or DEFINE_CLASS is used to start the class declaration for a dbTable class. However, you should still have the
};
at the end of the declaration, just like any other class.
This is the classic mistake - instead of searching for People with a Salary of 50000, we are actually assigning to the current record.
People[People.Salary=50000];
cout << People << endl << endl;
If you have OOF_Debug defined, the default setting of requiring an explicit save will catch this error, and give you a message like:
"ContextChange called on dirty record without saving: file name: People"
An error 165 results if you change a schema to remove indexes, and then open an old file. (we are working on embedding OOFILE schemas in databases so you can "blind open")
Back to index