Thanks all,
with your help I figured out what happened. You are all correct in that the
sequence is out of sync with the "key" value. I dumped the db and then
selectively restored it from the sql file some time ago by cutting and
pasting directly to the command prompt. I must have left out the commands
that tell it what the current value of the sequence is. Problen solved.
Many thanks,
Greg.