Item Line Numbers in Orders/Purchase Orders

SOLVED

I wrote a .NET application for a customer that created Orders/Purchase Orders. No problems with doing that. Now I need to update those Order/Purchase Orders. The problem that I am having is that I can't insert detail items where I want them to go. For example, I have 5 items and want to insert a new item after the item on line 2. I have tried setting LINENO (Orders) and PORLREV (Purchase Orders) with what I think are appropriate values. The new items are inserted but not in the order that I want.

Help

Rob