سؤال

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.

هل كانت مفيدة؟

المحلول

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;        
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top