以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助]总表A表包含所有数据,如何和四个子表BCDE保持同步更新? (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=127564) |
-- 作者:fjb2018 -- 发布时间:2018/11/16 17:01:00 -- [求助]总表A表包含所有数据,如何和四个子表BCDE保持同步更新? 自己试了很多次都没有成功,请教下论坛上的高手们该怎么办。 For Each dr1 As DataRow In DataTables("A").Select("[项目时间] = \'B\'") Dim dr2 As DataRow = DataTables("testB").AddNew() For Each dc As DataCol In DataTables("A").DataCols dr2(dc.Name) = dr1(dc.name) Next Next For Each dr1 As DataRow In DataTables("A").Select("[项目时间] = \'C\'") Dim dr2 As DataRow = DataTables("testC").AddNew() For Each dc As DataCol In DataTables("A").DataCols dr2(dc.Name) = dr1(dc.name) Next Next For Each dr1 As DataRow In DataTables("A").Select("[项目时间] = \'D\'") Dim dr2 As DataRow = DataTables("testD").AddNew() For Each dc As DataCol In DataTables("A").DataCols dr2(dc.Name) = dr1(dc.name) Next Next For Each dr1 As DataRow In DataTables("A").Select("[项目时间] = \'E\'") Dim dr2 As DataRow = DataTables("testE").AddNew() For Each dc As DataCol In DataTables("A").DataCols dr2(dc.Name) = dr1(dc.name) Next Next 也有在DataColChanged上设置上有新增的会自动更新,但是不会设置DataRowDeleting |
-- 作者:有点甜 -- 发布时间:2018/11/16 17:38:00 -- 1、BCDE表是不需要的。
2、BCDE表可以使用查询表的方式,直接从A表得到
http://www.foxtable.com/webhelp/scr/2321.htm
3、或者,参考
http://www.foxtable.com/webhelp/scr/2490.htm
|
-- 作者:fjb2018 -- 发布时间:2018/11/16 18:11:00 -- 感谢感谢,这就研究一下 |