Why selecting the row in the database using the SQL property of the TADOQuery.active must be set to true, and to insert — do not have?

Hello. There is such code.
procedure TFormMain.Button7Click(Sender: TObject);
begin;

FormMain.QueryOrganizer.SQL.Clear;
 FormMain.QueryOrganizer.SQL.Text := 'INSERT INTO organizer' +
 '([Code order], [employee Code]) ' +
 'VALUES' +
 '(1, 1)';
FormMain.QueryOrganizer.ExecSQL;

FormMain.QueryOrganizer.SQL.Clear;
 FormMain.QueryOrganizer.SQL.Text := 'SELECT * FROM organiser;';
 FormMain.QueryOrganizer.Active := true;
FormMain.QueryOrganizer.ExecSQL;
ShowMessage(FormMain.QueryOrganizer.FieldByName('Code').AsString);

FrameOrganizer1.DBGrid1.Datasource.Dataset.Close;
FrameOrganizer1.DBGrid1.Datasource.Dataset.Open;

end;

If you comment out the line
FormMain.QueryOrganizer.Active := true;
SELECT will not work - will be given a popup with the message "QueryOrganizer: Field 'Code' not found". However, the INSERT will still work. Why?
March 23rd 20 at 19:41
1 answer
March 23rd 20 at 19:43
Solution
Because INSERT doesn't return the "Code"field.

Find more questions by tags Delphi