Connect before selecting database