我想在表中增加记录,要求增加的记录在表的最后,语句如下
  Query_KG1.Edit;
  Query_KG1.Append
  Query_KG1.FieldByName('KGBH').AsString:=Combobox_KGBH.Text;
  Query_KG1.FieldByName('KGXH').AsString:=Combobox_KGXH.Text;
  Query_KG1.FieldByName('EDDY').AsString:=Combobox_EDDY.Text;
  Query_KG1.FieldByName('EDDL').AsString:=Combobox_EDDL.Text;
  Query_KG1.FieldByName('CDRL').AsString:=Combobox_CDRL.Text;
  Query_KG1.FieldByName('ZZCM').AsString:=Combobox_ZZCM.Text;
  Query_KG1.FieldByName('CCBH').AsString:=Combobox_CCBH.Text;
  Query_KG1.Post;
为什么总是出错: "Query_KG1 cannot modify  a read_only dataset",但我并没有设定dataset为只读,我调试过,好象是Query_KG1.Append有错,请高手指教如何更正。

解决方案 »

  1.   

    我把Query_KG1.RequestLive := true放在Query_KG1.Append之前,但还是不行,这时出错:"Table is read only", 其实我都没有用Table.
    另外我的表里字段允许为空。
      

  2.   

    我把Query_KG1.RequestLive := true放在Query_KG1.Append之前,可这时还是出错:Table is read only.其实我都没有用Table.
    另外我的表里字段允许为空。