// file : template/driver.cxx // copyright : not copyrighted - public domain #include // std::auto_ptr #include #include #include #include "database.hxx" // create_database #include "person.hxx" #include "person-odb.hxx" using namespace std; using namespace odb::core; int main (int argc, char* argv[]) { try { auto_ptr db (create_database (argc, argv)); { person p ("John", "Doe", 21); transaction t (db->begin ()); db->persist (p); t.commit (); } } catch (const odb::exception& e) { cerr << e.what () << endl; return 1; } }