DAC for MySQL
Example: Append, FieldValues, Post | Previous Next |
This example appends a new record to a table when the user clicks a button. The two fields with
names ALPHANUMERICFIELD and INTEGERFIELD are filled from the contents of two edit controls.
procedure TForm1.Button1Click(Sender: TObject);
begin
MySQLTable1.Append;
MySQLTable1.FieldValues['ALPHANUMERICFIELD'] := Edit1.text;
MySQLTable1.FieldValues['INTEGERFIELD'] := StrToInt(Edit2.text);
MySQLTable1.Post;
end;