I was thinking maybe Istanbul/Constantinople or Rome... just curious
I guess it depends on what one's definition of 'capital' is, truly.
Rome, for example, stopped being the administrative capital of importance in the third century, as emperors spent most of their time on the march or in the provinces during that century. In the 4th century Constantinople was founded, while other cities like Trier rose in importance, etc etc etc.
Constantinople was the sole capital of the Byzantines/Eastern Romans, and then the Turks, for almost the entire period from 476 to 1918, outside of the period from 1204 to 1261, so almost 1500 years.
Another contender is Paris: it was made the capital of France (Francia) from 508, and outside about 80 years was the capital of the Frankish and then French kings and then French Republics for the entire period, outside of a few years here and there (such as 1871, and of course, 1940 to 1944).
By my rough estimate, Paris slightly beats out Constantinople/Istanbul if we date from 476, but Constantinople/Istanbul slightly beat out Paris if we date from its founding. However, based on my math, Paris will be the city with the longest history of being a capital within my own lifetime.
I would suggest Delhi as a definite contender for runner up. It was established as the capital of the Delhi sultanate in the beginning of the 13th century and has more or less retained that status to this day. It was made the capital of the Mughal Empire, British Raj, and the Modern Republic of India. But there were times throughout that span that the capital was shifted for military or political reasons. But for the last 800 years, Delhi has for the most part been the capital of a state dominating the Gangetic plains.
My pick would be Beijing. First records are about 2500BC, was capital of various states from at least 1100 BC upto the unification of China in 221BC then capital again from 1279 except for a couple of brief interludes totalling maybe 70 years.
Not the absolute longest I suppose but no one's yet mentioned Kyoto or Heian-kyo, as it was originally called. It was founded as Japan's imperial capital in 794 and remained so all the way up until 1868, despite the loci of power shifting to other cities. So that's not quite 1100 years.
I believe that Damascus, Syria is your answer.