开发者

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;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜