Blog信息 |
blog名称:注册会计师(注会)练习软件 日志总数:398 评论数量:116 留言数量:27 访问次数:3272217 建立时间:2005年6月6日 |

| |
[borland eco 技术]eco中整表删除代码 软件技术
吕向阳 发表于 2006/11/24 16:31:45 |
此为正确的代码
var list1:ielementcollection;
begin
...
list1 := ehfx.element.GetAsCollection; for I := List1.Count - 1 downto 0 do begin afx := fxbb(list1.item[i].asobject); if assigned(afx) then afx.AsIObject.Delete; end;
fecospace.UpdateDatabase; DataBind;
不能用iobjectlist进行操作,原来代码如下不能正常操作
var list1:iobjectlist;
begin
...
list1 := iobjectlist(ehfx.element.getascollection());
for I := List1.Count - 1 downto 0 do begin afx := fxbb(list1[i]); if afx <> nil then
afx.AsIObject.delete; end; fecospace.UpdateDatabase;
出现的结果是没有进行任何操作. |
|
|