ClientDataSet1.FieldByName('ddzp').Value:=ClientDataSet2.FieldByName('formpm').Value;
ClientDataSet1.FieldByName('ddzp').Value:='988';
ClientDataSet1.ApplyUpdates(0);
这样数据都保存不了,只有在数据控件中输入数据才能保存
不知为什么?

解决方案 »

  1.   

    同意
    ClientDataSet1.Edit;
    ClientDataSet1.FieldByName('ddzp').Value:=ClientDataSet2.FieldByName('formpm').Value;
    ClientDataSet1.FieldByName('ddzp').Value:='988';
    ClientDataSet1.ApplyUpdates(0);
    这样试试
      

  2.   

    我是新增啊,只要有付值的全部保存不了,数据控件不能付值
    ClientDataSet1.Append;
    ClientDataSet1.FieldByName('gx').Value:=ClientDataSet1.FieldByName('gxmz').Value;
    DBLabel1.Caption:=ClientDataSet2.FieldByName('ename').Value
    DBLabel1.Caption:='没有此工号';
    像这样都保存不,我要付值给DBLabel1、DBEdit1,等保存到数据库中,还有什么解决办法,不付值手工输入可能保存,字段类型也是没有问题