Openning database in dialog