I save the table in a DB, and gives an error

adoquery dataset not in edit or insert mode

Code:

procedure TForm1.Button4Click(Sender: TObject); begin try ADOQuery1.Active:=True; ADOQuery1.Post; except on e:Exception do end;end; 

    1 answer 1

    See examples in the help too:

     ADOQuery1.Active:=True; ADOQuery1.Edit;//ADOQuery1.Insert; ADOQuery1.FieldByName('MyField').AsString:='My Value'; ADOQuery1.Post; 
    • what for example should be instead? 'MyField''My Value' - LLIAKAJI
    • Field and its meaning. You change the current record (or add a new one), specify the field values, then do Post. The recording (if there are no errors) will be recorded in the database. - Yura Ivanov