Is there a way to know if TAdoQuery in Edit state was changed?

瘦欲@ 提交于 2019-12-23 23:22:49

问题


Is there a way to know if TAdoQuery in Edit state was changed?

Assuming we forced it into edit state, and we want to ask the user if he wants to keep the changes.


回答1:


You have the TADOQuery.Modified property e.g:

if ADOQuery1.State in [dsEdit, dsInsert] and (ADOQuery1.Modified) then
  if KeepChanges then
    ADOQuery1.Post
  else
    ADOQuery1.Cancel;        


来源:https://stackoverflow.com/questions/7792193/is-there-a-way-to-know-if-tadoquery-in-edit-state-was-changed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!