: I have to go through a table with a TCursor and process certain
: records, then add them to another table and delete the originals.
: Sometimes there may be an index error when adding to the second table.
: In those cases I do not want the processed records do dissapear in no
: mans land.
: How can I trapp the error event: index error?
if not tc.postRecord then
errorshow("Would not post record " + string(tc.recNo()))
quitLoop ;or return, or your error correcting measures
Another approach would be to post the records to a table with
identical structure, but no indexes. Then, when you add the
primary key again, some records will go to the :PRIV:KEYVIOL
table. Edit them and add them to the keyed table.