请教关于AdoDataSet里deleterecords的用法

simplez 2002-10-11 10:30:38
我知道这个是用来删除dataset里全部记录的,就是不知道具体格式是怎样的,请教一下,谢谢。
...全文
115 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
simplez 2002-10-11
  • 打赏
  • 举报
回复
不行啊,我用adodataset1.deleterecords(arAll);
后。
提示'Operation is not allowed in this context'
Drate 2002-10-11
  • 打赏
  • 举报
回复
TAffectRecords = (arCurrent, arFiltered, arAll, arAllChapters);
procedure DeleteRecords(AffectRecords: TAffectRecords = arAll);
arCurrent Only the deletes the current record.
arFiltered Only deletes records accessible through the current filter.
arAll Deletes all records in the recordset.
arAllChapters Deletes records in all chapters (ADO chapters)

例:AdoDataSet.DeleteRecords([arAll])//这样就删除掉全部了!

5,931

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧