only reconnect if there is an error on the database handle
quote labels