tsqlquery delete lazarus / 16-Databases ---------------------------------------------------------------------- pomalo · 2008-08-25 11:04 hello in my app i have a button with the following code for action Code: [Select] p := produitsQuery.FieldByName('produits').asString;      if(MessageDlg('Êtes vous sur de vouloir supprimer l''enregistrement "' + p + '"',mtConfirmation,[mbYes,mbNo],0) = mrYes) then              begin              produitsQuery.Edit;              produitsQuery.Delete;              produitsQuery.Post;              produitsQuery.ApplyUpdates(0);              end;   but when i click on the button i got a "EdatabaseError" exception with this message: QuoteProduitsQuery: Operation not allowed. dataset "produitsQuery" is not in an edit or insert state" What is wrong? thank claude ---------------------------------------------------------------------- pomalo · 2008-08-25 19:39 TSQLquery.delete does  not need "edit" and  "post" :oops: removing QuoteproduitsQuery.Edit; and QuoteproduitsQuery.post;   solve the problem[/quote]