Good morning all
It compiles, but at runtime, I have an error, the dataset is not in add or edit mode
While I have placed the APPEND command?
or do I make a mistake?
Thank you for your reply
procedure TForm3.Button4Click(Sender: TObject);
begin
//////////////////ajouter en fin de table
if DBEdit1.text <>'' then
begin
DBEdit1.Color := clGreen;
lignesDeSaisie.Last;
Try
lignesDeSaisie.Append;
lignesDeSaisie.FieldByName('compte').AsString := Form1.Xcomptes.FieldByName('compte').AsString;
lignesDeSaisie.FieldByName('label').AsString := Form1.Xcomptes.FieldByName('label').AsString;
lignesDeSaisie.Post;
finally
end;
DBEdit3.SetFocus;
end else begin
DBEdit1.Color := clRed ;
messagedlg('Compte NON Trouvé Ou Vide .',mtinformation,[mbok],0);
StatusBar1.SimpleText:= 'Ce compte n existe pas ';
end;
end;