How to avoid duplicate data?
How to avoid duplicate data?
How can avoid duplicate fields in a virtual table? There is no keyfields property and lookup and locate don't work while editing a record.
Let me explain a bit more.
Supose you want to add a row with a field that requires unique values. How do you check that the field does not contain data that is already in the dataset?
For example you have a table T with Field F, you want to be sure Field F does not have a value already present in the table T before adding the row to the table. How do you check? If you are editing the row and call Locate, a scroll event occurs that forces the record to be posted, and VirtualTable does not have a Keyfields property that will disallow the row to be inserted with the duplicate value.
Supose you want to add a row with a field that requires unique values. How do you check that the field does not contain data that is already in the dataset?
For example you have a table T with Field F, you want to be sure Field F does not have a value already present in the table T before adding the row to the table. How do you check? If you are editing the row and call Locate, a scroll event occurs that forces the record to be posted, and VirtualTable does not have a Keyfields property that will disallow the row to be inserted with the duplicate value.