Updates the DB connection function.