Deleting the row of a Table in Delphi
I added a table, but I have som开发者_StackOverflow社区e particular row that I want to delete it. How can I do that?
TDataSet.Delete is the obvious answer...
If you are using a TTable, you can use the FindKey method to position the cursor on the correct row and then just call the Delete method of TTable.
if there is no index in your table (to use the FindKey as Jim mentioned), you can search manually for the record you want to delete, for ex:
if TTable.FieldsByName('FieldName').AsString='CertainValue'
TTable.Delete;
精彩评论