Back in the 70s I had excellent results with the following recipe:
1/2 cup of sugar
1/2 cup of molasses
1 teaspoon of baking yeast
Mix this goo together and smear some onto a piece of cardboard along the ants' trail. It can take awhile for the ants to realize there is some excellent food up there for them but they will. Once they do they will be attracted to it and ignore everything else. It has to be the yeast that kills them but I'm not sure how. My theory is that they return the yeast to their nests and there the yeast "infects" or contaminates the rest of their food supply killing them. Once they found the goo it took them several days to clean it up. I reapplied (dripped in my goo) before they forgot where it was. After the second app I noticed there were fewer and fewer ants visiting. Eventually they all disappeared. I'd guess it took two full weeks, but I didn't have an any problem after that.