It sounds like an index corruption. Try to rebuild indexes on the parent table.
>Using VFP7.
>
>In my database I have a parent and child table. I relate the 2 tables on an orderno field. I also put some rules on the relation using the "Referential Integrity Builder".
>
>I am having problems with the Insert rule. I check the "Restrict" button for the parent and the child tables so that the only way child records can be added is by having a matching key field in the parent table.
>
>This works 95% of the time. However, once in a while a user calls with a problem. The error they get is "Trigger Failed" when trying to INSERT INTO child (keyfield) VALUES ("keyvalue_from_parent").
>
>I browse the parent table and the record and key field does exist. But if I try a SEEK "keyvalue" in the parent table, the record is not found, even though I am staring at the record. But if I copy and paste the keyvalue back into the key field, everything works again.
>
>There can't be any buffering going on because I look at the tables from another PC. I know the record is written to the table but it's like the index isn't updated.
>
>Has anyone else seen this happen before?
>
>Thanks,
>
>Jerryt
--sb--