Global DB: add test connection, select DB, and get error method; and make database error variable private