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

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -