create.C


#include <oo.h>
#include <iostream.h>
#include <stdlib.h>

main( int argc , char* argv[])
{

ooTrans               transaction;

// initialize db
ooInit();

// start transaction
if( transaction.start() != oocSuccess )
{ cout << "transaction.start error" << endl;
  return 1;
}

// open the federated database on the fdH handle
ooHandle(ooFDObj)     fdH;


if( fdH.open(getenv("OO_FD_BOOT"), oocUpdate) != oocSuccess )
{ cout << "fdH.open error" << endl;
  return 1;
}

// create a new database file
ooHandle(ooDBObj) db;

cout << " creating database " << argv[1] << endl;
db = new ooDBObj (argv[1]);

//and commit the transaction
transaction.commit();

}