When an Iowa corn processing company tried to sell one of its products in Virginia, it probably didn't realize what a sacred cow was.

Now, thanks to the efforts of the Virginia dairy industry, it has discovered that, in the Old Dominion at least, a sacred cow is after all a cow.

It all started with something called Frostline, an artificial ice cream that Virginia dairy farmers wish would just melt and go way.

But Frostline can't melt. It's powdered.

And that as much as anything is at the heart of an issue that has dragged on for nearly three years and finally landed in Circuit Court Judge William Spain's courtroom in Richmond.

It is a tale of the power of government regulations, the influence of the dairy lobby and the many uses of an ear of corn.

It is also the subject of Judge Spain's September ruling that has the dairymen hot over ice cream because it may open the Virginia market to Frostline.

At the heart of the dispute is corn, because that is what Frostline is made of. The corn syrup solids are products of the Grain Processing Corp. of Muscatine, Iowa, which likes to brag that it has found hundreds of uses for anything in a kernel of corn.

According to Grain Processing, restaurants that serve soft ice cream or frozen custard can save money by serving Frostline instead - up to 30 cents a gallon. All they need to is mix Frostline with water, stir and freeze.

"It tastes just like any other soft-serve dessert," says a Grain Processing executive who explains eagerly that it is available in both chocolate and vanilla.

What it is not available in, however, is Virginia, and because of that, Judge Spain became involved in the case.

On an appeal from Grain Processing, Spain reversed a ruling by the Virginia Board of Agriculture and Commerce that had effectively barred Frostline from competing with real ice cream in Virginia restaurants.

The board ruled last year that Frostline was subject to dairy regulations, although it contains no milk.

Restaurants that mixed Frostline would have to pasteurize it before freezing the board said. But that adds a costly process that makes Frostline difficult and expensive to prepare, the company replied.

The agriculture board discounted evidence presented by Grain Processing that Frostline tested consistently pure in the laboratory, and that pastuerizing the product is not required in any of the 15 states, including Tennessee and Kentucky, where Frostline is now sold.

Judge Spain found a bad flavor in some of the official state testimony before the board. Some examples:

One witness said Frostline should be pasteurized to kill the germs that would come from the water it was mixed with. But the witness later admitted Frostline would be made from the tap water Virginians drink every day.

Another witness testified that the restaurant untensils and containers used for mixing Frostline might be dirty, although he conceded that said more about the restaurant than the product.

The board's ruling against Frostline's application to be exempted from pasteurization prompted Spain's observation that the board was under the influence of milk - or more appropriately of the dairy industry.

The industry had testified against Frostline, but it wasn't that as much as the industry's wasn't that as much as the industry's influence on the board's own staff which the judge found in poor taste. At one public hearing, for instance, four of the staff witnesses against Frostline were either former of current diary industry employes.

Spain found that the board's decision "was based upon speculation and concern for the dairy industry," and that the board "erred whn it ignored or failed to pursue evidence of what appears to be an unusually active staff in dairy industry-coordinated efforts . . ." The judge told the board to go back and reconsider the evidence, which the board is now doing.

But the Frostline battle isn't over. Virginia dairymen are still arguing that it should be pasteurized.

John L. Miller, executive secretaty of the Virginia Dairymen's Association, says that state's food standards will suffer if Frostline is not pasteurized. This product is coming in to be a substitute for a dairy product, and it should meet the same standards," he says.

Miller was asked why those rules should apply to a nondairy powdered mix when the same rules don't apply to other powdered mixes such as instant cocos, puddings or soup mix. "I don't know how to answer that," he said.

Grain Processing executives and state officials declined to be quoted because the case is still within Spain's jurisdiction.

But, says a Grain Processing official privately: "Whenever a new product comes on the challenges something well established, it's hard."

"Let's put it this way," says Miller. "No diary farmer likes the idea of competition."