Yes it's a temparary med, but boy is it a pain and gives me a ton of laundry to do!! He wakes up as he's going and then starts to cry, but it's also happening durring the day, just no warning tell it's too late to make it anywhere.
The thing I found that worked the best with my boys was 'potty candy' Basicly I got some candy, and when they tried to go, or went potty they got a candy. It makes them want to go hehehe

It worked so well with my oldest that he was completly potty trained in 4 days and has never even had an accedent.
Might be worth a try