I went through the ringer with ants the beginning of this year. They were sugar ants, and terribly persistant. I was feeding the bees, trying to get them ready for the nectar flow, and the ants were going crazy to get to the feeder.
I tried cinnamon, borax, oil on the hive stand legs, diatomaceous earth, digging moats around the legs and voodoo. The voodoo helped a little.
The thing I started using did the trick immediately, and has been effective for several months now. GuardStarâ„¢. It's good for Small Hive Beetles, and good for ants.
I mean, bad for them. Whatever. Not a single ant after that.