J
jameschin
Unregistered / Unconfirmed
GUEST, unregistred user!
我用如下代码完成追加
procedure TForm1.sb_appendClick(Sender: TObject);
begin
mydata.ADOTable1.Append;
form1.Edt_name.SetFocus;
mydata.ADOTable1name.AsString := form1.Edt_name.Text;
mydata.ADOTable1sex.Value := form1.chk_sex.Checked;
end
sb_append 是speedbotton
edt_name 是edit
chk_sex是checkbox
追加后调用post方法后dbgrid只得到sex字段的值,name的值是空的
procedure TForm1.sb_appendClick(Sender: TObject);
begin
mydata.ADOTable1.Append;
form1.Edt_name.SetFocus;
mydata.ADOTable1name.AsString := form1.Edt_name.Text;
mydata.ADOTable1sex.Value := form1.chk_sex.Checked;
end
sb_append 是speedbotton
edt_name 是edit
chk_sex是checkbox
追加后调用post方法后dbgrid只得到sex字段的值,name的值是空的