Question: What party did the incumbent from the Virginia 5 district who was re-elected and was first elected in 1797 belong to?
SQL: SELECT party FROM table_2668401_17 WHERE result = "Re-elected" AND first_elected = "1797" AND district = "Virginia 5"