妥了,经验证版主的代码能够执行,而且执行完毕后,反展的速度确实快了。万分感谢。
还有个问题需要烦请版主帮下忙,就是有这样一段代码。
项目文件有内部表A,数据源erp,用以下代码填充外部数据:
dim s as string=";with cte As(select *,cast(num as numeric(18,4)) As CalcNum from abt00000 where parentitem in (select distinct itemcode from aec00000 where centercode='0100' and requiredate between '2010-05-10' and '2010-05-10') union all select a.*,cast(a.num * cte.CalcNum as numeric(18,4)) from abt00000 a join cte on a.parentitem = cte.childitem) select a.requiredate,a.requiresumcontractno,a.planid,b.childitem,c.name,c.unit,a.plannum,b.CalcNum*a.plannum as calculation,'' as deptcode,'' as workcentercode from cte b,aec00000 a,aaa00000 c where b.childitem=c.code and a.itemcode=b.parentitem and a.centercode='0100' and a.requiredate between '2010-05-10' and '2010-05-10'"
datatables("表A").fill(s,"erp",true)
现在需要将其中的deptcode和workcentercode 两列从后台数据库erp不同的两个表中更新数据,如何处理?
也就是说如何更新显示已加载表的部分列内容,此处可以用update吗?
[此贴子已经被作者于2010-4-22 13:28:17编辑过]