CREATE TABLE table_2668401_17 (party VARCHAR(255), district VARCHAR(255), result VARCHAR(255), first_elected VARCHAR(255))
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"