The best pain meds are the ones like metacam, deramaxx, rimadyl.
It sounds like he might have some spinal arthritis (stool incontinance often goes with that) and mostly the glucosamine supplements do not help with spinal issues.
I've used liquid glucosamine such as Adequan shots.
You could see if glycoflex or cosequin help him.
But I think the stuff your vet gave you is about the same thing.
You might find accupuncture will help him with his pain. A holistic vet might be able to suggest other supplements too. This site may help you find one to work with on these choices
http://www.holisticvetlist.com/#search
Hope this helps you!
Please press Accept if you find my answer helpful. Want more info? Just reply on your question!
Bonuses for good work are always appreciated!
Thanks for the opportunity to help you!