kbmmemtable 更新表
procedure TForm6.btn3Click(Sender: TObject);
var
fld_Id:TIntegerField;
fld_Value:TStringField;
fld_Time:TDateTimeField;
begin
//更新
cxGrid1DBTableView1.DataController.DataSource := ds1;
ds1.DataSet := kbmtbl1;
with kbmtbl1 do
begin
Open;
fld_Id:=TIntegerField(FieldByName('Id'));
fld_Value:=TStringField(FieldByName('Value'));
fld_Time:=TDateTimeField(FieldByName('Time'));
if Locate('Id',5,[]) then
begin
Edit;
fld_Value.AsString := '内容被修改';
fld_Time.AsDateTime := Now;
Post;
end;
end;
end;