#include #include #include "myObject.h" int main() { char *bootFile; ooHandle(ooFDObj) fdH; ooHandle(ooDBObj) dbH; ooHandle(myObject) mo1, mo2; ooTrans trans; ooInit(); trans.start(); bootFile = getenv("OO_FD_BOOT"); fdH.open(bootFile, oocRead); if (dbH.open(oovTopFD, "myDatabase", oocRead) != oocSuccess) { cout << "Could not open `myDatabase'." << endl; return 1; } ooItr(myObject) bItr; // and let it scan through the database file if (bItr.scan(dbH) != oocSuccess) { cout << "scan error" << endl; return 1; } while (bItr.next()) { bItr->printID(); } // we close the transaction properly dbH.close(); fdH.close(); trans.commit(); return 0; }