>Craig,
>we are using autoinc primary keys but in a number of places the user can change the order of the lines or insert a new line in the middle of the invoice. ie. add a comment under an existing line. The primary line keys can't be used for the order.
>
John,
Maybe you could add a line number field to your invoice table, then, just before saving, loop through your invoice records and add the line numbers in sequential order.
HTH,
Jim