Not for long-term
What do you propose to take when the Codeine does not work? This is a losing battle you are fighting.
The pain is caused by a problem. The best way to make the pain disappear is to address the problem by seeing a dentist. I realize that it is sometimes difficult to visit a dentist, but if you don't address your dental problem, it will likely not resolve itself and will likely become worse.