delphi - query execution : warn user if multiple records are to be deleted -
how warn user (with confirmation dialog) query execute delete more 1 record ?
'delete from...where...' can encompass 1 or more records wondering how warn user going delete more 1 record.
it sounds you're asking how prompt user...
case messagedlg('are sure wish delete multiple records?', mtwarning, [mbyes, mbno], 0) of mryes: begin //continue dowhatneedstobedonetodeletemultiplerecords; end; mrno: begin //don't continue end; end;
for example, may do...
if adoquery1.recordcount > 1 begin prompttodeletemultiplerecords; end;
so sum up, code might like...
if adoquery1.recordcount > 1 begin case messagedlg('are sure wish delete multiple records?', mtwarning, [mbyes, mbno], 0) of mryes: begin //continue dowhateverneedstobedonetodeletemultiplerecords; end; mrno: begin //don't continue end; end; end;
Comments
Post a Comment