with DM_server.ClientDataSet3 do begin if not active then open; ... edit; FieldByName('Id').AsString:=User; FieldByName('Name').AsString:=ware_name; FieldByName('khbh').Value:=idcount; FieldByName('khdz').AsString:=sPath+'\'+User; Post; ApplyUpdates(1); end;
缓存模式下,提交数据库时updateBatch
调用时出错can't perform this operation on an open dataset
ds.LockType:=ltBatchOptimistic;
var
ds: TADODataSet好像不行
当我给ds某个字段赋值时
ds.FieldValues[DB_FILED_Image_PosSign]:= PosSign;
出错 dataset not in Edit or insert mode
缓存模式下,提交数据库时updateBatch
我也这样认为
commandtext 属性
begin
if not active then
open;
...
edit;
FieldByName('Id').AsString:=User;
FieldByName('Name').AsString:=ware_name;
FieldByName('khbh').Value:=idcount;
FieldByName('khdz').AsString:=sPath+'\'+User;
Post;
ApplyUpdates(1);
end;