Finds a database, and makes it the current database.
You must use this function before accessing the database properties.