以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [原创]窗口绑定创建的临时表为什么会报错呢? (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=118478) |
-- 作者:lhpc120 -- 发布时间:2018/5/3 19:19:00 -- [原创]窗口绑定创建的临时表为什么会报错呢? Dim dt As DataTable cmd1.Co mmandText = "Se lect * From {尺码子表} where 尺码表编号 = 1" dt = cmd1.ExecuteReader() Dim dtb As New DataTableBuilder("统计") dtb.AddDef("Size", Gettype(String), 16) Dim prds As List(of String) = dt.GetValues("Size","","[_Identify]") For Each prd As String In prds dtb.AddDef(prd, Gettype(String), 100) Next dtb.Build() For Each nm As String In dt.GetValues("尺寸位置","","[_Identify]") Dim dr As DataRow = DataTables("统计").AddNew() dr("Size") = nm For Each prd As String In prds Dim dr1 As DataRow = dt.Find("尺寸位置 = \'" & nm & "\' And Size = \'" & prd & "\'") dr(prd) = dr1("参数") Next Next MainTable= Tables("统计") \'Tables("查看尺码表_Table1").DataSource = dtb.BuildDataSource() |
-- 作者:有点甜 -- 发布时间:2018/5/3 19:29:00 -- Tables("查看尺码表_Table1").DataSource = dtb.BuildDataSource()
改成
Tables("查看尺码表_Table1").DataSource = DataTables("统计") [此贴子已经被作者于2018/5/3 19:29:12编辑过]
|