Often accompanying a cold, I get excruciating pains in my ears when I swallow. This can last for up to 2 weeks?

Ear pain with cold. Middle ear is connected to back of throat by eustachian tubes to equalize pressure on ear drums. When swollen shut by respiratory or ear infxn, swallowing can cause pain. Try using a decongestant like sudafed (check with doc first) to open these tubes, relieve built up pressure. Nsaids can also fight inflammation (caution if you have ulcers, bleeding disorder, or on blood thinner).
Eustachian Tube. With a cold comes inflammation of the eustachian tube and mucus production. This tube equalizes pressure within the middle ear. With an occluded eustachian tube the pressure translates to the ear causing pain. Similar to how you "pop your ears" by swallowing when going up in a plane.