有谁用过Delphi6指南中21章三层中更新单元的,第756页的
我用的是中层ADO,客户端用DCOM
客户端出错,客户端执行到下面出错
procedure reconciledeltas(const cdsarray:array of Tclientdataset;
vdeltaarray:olevariant);
var
bReconcile:boolean;
i:integer;
lowCDS,HhighCDS:integer;
begin
lowcds :=low(cdsarray);
highcds:=high(cdsarray);
bReconcile := false;
for i:= lowcds to highcds do
if not varisnull(vDeltaarray[i]) then //出错提示'Invalid argument'
begin
cdsarray[i].reconcile(vDeltaarray[i]);
bReconcile :=true;
break;
end;
if not bReconcile then
for i:=highcds downto lowcds do
begin
cdsarray[i].reconcile(vdeltaarray[i]);
cdsarray[i].refresh;
end;
end;
end;
我用的是中层ADO,客户端用DCOM
客户端出错,客户端执行到下面出错
procedure reconciledeltas(const cdsarray:array of Tclientdataset;
vdeltaarray:olevariant);
var
bReconcile:boolean;
i:integer;
lowCDS,HhighCDS:integer;
begin
lowcds :=low(cdsarray);
highcds:=high(cdsarray);
bReconcile := false;
for i:= lowcds to highcds do
if not varisnull(vDeltaarray[i]) then //出错提示'Invalid argument'
begin
cdsarray[i].reconcile(vDeltaarray[i]);
bReconcile :=true;
break;
end;
if not bReconcile then
for i:=highcds downto lowcds do
begin
cdsarray[i].reconcile(vdeltaarray[i]);
cdsarray[i].refresh;
end;
end;
end;
解决方案 »
- 无语中散分,我为啥多发了这么多帖子?
- 运行时间设计窗体
- 怎么能让ComboBox只能输入数字,数值(包括加,减,小数点)
- *************************免费短信服务*******************************
- 《Borland传奇》部份文章节选,感谢网友bluelf的收集和整理!
- 您好,请教动态数组和随机抽取纪录的问题,谢谢。
- 我怎样能用代码将日期设置成“yy-MM-dd”格式?
- 关于数据库二进制数据传输的问题,知道的帮帮忙吧
- 大家帮帮忙!我初学pascal!~
- 关于计算时间的问题!
- 告别2003,迎接2004!!2003最后一贴,放分!!
- dbgrid里面能显示dbcheckbox吗?
数组下标越界,vDeltaarray的元素个数和cdsarray的元素个数不一样.
procedure reconciledeltas(const cdsarray:array of Tclientdataset;
vdeltaarray:olevariant);
var
bReconcile:boolean;
i:integer;
lowCDS,HhighCDS:integer;
begin
lowcds :=low(cdsarray);
highcds:=high(cdsarray);
bReconcile := false;
for i:= lowcds to highcds do
if not varisnull(vDeltaarray[i]) then //出错提示'Invalid argument'
begin
cdsarray[i].reconcile(vDeltaarray[i]);
//出现Invalid data packet
bReconcile :=true;
break;
end;
if not bReconcile then
for i:=highcds downto lowcds do
begin
cdsarray[i].reconcile(vdeltaarray[i]);
cdsarray[i].refresh;
end;
end;
end;