diff --git a/main.cxx b/main.cxx index eb5f06c30cdd2f2ef8a4796f577d14ebbe2a2a38..ca59d046f5554393c9691bdd721bd6a1a16ec6be 100644 --- a/main.cxx +++ b/main.cxx @@ -8,6 +8,9 @@ using namespace ProductionDatabase; int main() { + ProductionDatabaseClient *proddb = new ProductionDatabaseClient(); + cout << "Intitializing apdBatchSetter with version " << proddb->getVersion() << " of the database access libraries."; + vector<string> apdSerials; string fileName = "serials.dat"; int nAPDs = 0; @@ -25,12 +28,10 @@ int main() cout << "Found APD no. " << nAPDs << ": " << newEntry << endl; } - ProductionDatabaseClient *proddb = new ProductionDatabaseClient(); - proddb->queryCredentials(); DatabaseClientResponse response = proddb->checkConnectivityAndCredentials(); if (response != Successful ) { - cerr << "Connection to database failed because of error " << response << endl; + cerr << "Connection to database failed because of error: " << response << endl; return response; } cout << "Connection successful!" << endl;