Am starting to rewrite an old FoxPlus (DOS) program from scratch using VFP50. One of the (free) tables will be a vendor table, with the user assigning a unique vendor lookup key (they could be adding a new vendor, or changing the lookup key of an existing vendor).
I have come up with 2 ways for checking for duplicate keys as the user enters a value into the vendor id field of the vendor add/edit form:
1) Set lookup key as a candidate key (with record buffering on). The problem is, when checking for a duplicate key, the record pointer is moved resulting in the table being updated with an incomplete record.
2) With record buffering off, use scatter memvar to populate the input form. After checking for a duplicate key, append a record to the table, and update it with the field values from the form.
# 2 is my preferred way. Any better way of doing this?
Thanks for any suggestions.
I have come up with 2 ways for checking for duplicate keys as the user enters a value into the vendor id field of the vendor add/edit form:
1) Set lookup key as a candidate key (with record buffering on). The problem is, when checking for a duplicate key, the record pointer is moved resulting in the table being updated with an incomplete record.
2) With record buffering off, use scatter memvar to populate the input form. After checking for a duplicate key, append a record to the table, and update it with the field values from the form.
# 2 is my preferred way. Any better way of doing this?
Thanks for any suggestions.