i have tried looking online but had no luck,
How i could delete all records in an adotable in button click, which match a varying criteria. For example i want to be able to delete all records in an adotable where Labour_ID (this is a field name within the adotable) is equal to DBedit.Text.
sorry this is a bit vague, but suggestions would be appreciated. thanks
You can delete the rows with a simple loop:
Better yet is to use a TADOQuery instead, and do it with SQL:
See the Delphi documentation on TDataSet.Locate for info on the last
LocateOptionsparameter. (The link is to XE2’s docs, but it hasn’t changed much (if at all) for ADO since D7).