openDatabase() improved