Called the DB connection in the correct Way after the update and made them public to the rest of the script!