When was the incumbent first elected in the district where the result was a democratic-republican gain?
CREATE TABLE table_2668401_17 (
    first_elected VARCHAR,
    result VARCHAR
)
SELECT first_elected FROM table_2668401_17 WHERE result = "Democratic-Republican gain"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When was the incumbent first elected in the district where the result was a democratic-republican gain? ### Input: CREATE TABLE table_2668401_17 (
    first_elected VARCHAR,
    result VARCHAR
) ### Response: SELECT first_elected FROM table_2668401_17 WHERE result = "Democratic-Republican gain"