Encircling the area electric fence is the most effective way. If you choose to follow this route, have one wire 4 to 6 inches above the ground and the other at 12 inches. Ideally, and for effectiveness sake, do the installation about two weeks before the sweet corn reaches the milk stage.