void test( int argc, char* argv[] ) { // Create the Datastore and Manager objects EmployeeDatastore theEmpDatastore; EmployeeManager theEmpMgr; Employee theEmp; // Connect to database cout << "Connecting to " << theEmpDatastore.datastoreName() << "..." << endl; if ( argc >= 3 ) theEmpDatastore.connect( argv[1], argv[2] ); else theEmpDatastore.connect(); theEmpDatastore.enableAutoCommit( false ); cout <<"...Connected" << endl; // Count all Employees in Department D11 int numEmp = theEmp.numEmpInDept( "D11" ); cout << "Count of all Employees in Department D11: " << numEmp << endl; // Disconnect from the database theEmpDatastore.rollback(); theEmpDatastore.disconnect(); // All done cout << "Done" << endl; }