>As a newbie to FoxPro (Clipper convert) and Windows programming, I have problems with VFP primary indexes on two fronts:
>
>1. There are occasions when the uniqueness of a primary code is violated. I get an error message to that effect with no recovery possible (while running the program). There is no recourse but to re-boot. How can I trap this error and recover from it a little more gracefully?
>
>2. A user marks a record for deletion, but does not pack. It's deleted primary code field triggers #1, above, if re-used. I don't want to pack on every deletion. What to do?????
>
>Thanks in advance for any help.
1. Turn your error trapping off during development. VFP should flag you gracefully about your index problem. I have no problems with this except frustration (s).
2. Use the actual deleted record. Just put empty values in the other fields and use it for a new rec. Basically just recycle without redundency.
HTH,
Tom