modified genDatabase.cpp to accept db connections from anywhere