Added a new openDB() to replace old functions.