From my own personal experience we have an ultrasonic dog deterrent and after taking him to obedience classes with two different places, we found that the ultrasonic was amazing and he soon learned that if he continued to bark I would press the button.
eBay