Z
zrobin
Unregistered / Unconfirmed
GUEST, unregistred user!
在com+数据对象中,有adsmaster(master表), adscalmaster(calmaster表),adsdetail(detail表),adscaldetail(caldetail表)四个数据控件;
master表中的Calculated字段calfieldmaster取自calmaster表;
detail表中的Calculated字段calfielddetail取自caldetail表;
adsmaster和adsdetail已设定成巢状数据表,adscalmaster及adscaldetail都有相关设定;
adsmaster之oncalcfields编写以下程序以取值:
try
adscalmaster.parameters.parambyname(‘calfieldmastid’).value := dataset.fieldbyname(‘masterid’).value;
adscalmaster.active:=true;
dataset.fieldbyname(‘calfieldmaster’).value:=adscalmaster.fieldbyname(‘calfield’).value;
finally
adscalmaster.active:=false;
end;
adsdetail之oncalcfields编写以下程序以取值:
try
adscaldetail.parameters.parambyname(‘calfielddetailid’).value := dataset.fieldbyname(‘detailid’).value;
adscaldetail.active:=true;
dataset.fieldbyname(‘calfielddetail’).value:=adscaldetail.fieldbyname(‘calfield’).value;
finally
adscaldetail.active:=false;
end;
前端用clientdataset连接时产生”非法的参数”的错误,但如果去掉detail表中的Calculated字段,则可以正确运行, master表中的Calculated字段也可以正确显示;怎样解决?
master表中的Calculated字段calfieldmaster取自calmaster表;
detail表中的Calculated字段calfielddetail取自caldetail表;
adsmaster和adsdetail已设定成巢状数据表,adscalmaster及adscaldetail都有相关设定;
adsmaster之oncalcfields编写以下程序以取值:
try
adscalmaster.parameters.parambyname(‘calfieldmastid’).value := dataset.fieldbyname(‘masterid’).value;
adscalmaster.active:=true;
dataset.fieldbyname(‘calfieldmaster’).value:=adscalmaster.fieldbyname(‘calfield’).value;
finally
adscalmaster.active:=false;
end;
adsdetail之oncalcfields编写以下程序以取值:
try
adscaldetail.parameters.parambyname(‘calfielddetailid’).value := dataset.fieldbyname(‘detailid’).value;
adscaldetail.active:=true;
dataset.fieldbyname(‘calfielddetail’).value:=adscaldetail.fieldbyname(‘calfield’).value;
finally
adscaldetail.active:=false;
end;
前端用clientdataset连接时产生”非法的参数”的错误,但如果去掉detail表中的Calculated字段,则可以正确运行, master表中的Calculated字段也可以正确显示;怎样解决?