以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  [原创]请问这段程序有什么错?  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=10061)

--  作者:aloby
--  发布时间:2011/5/19 17:37:00
--  [原创]请问这段程序有什么错?

下面二个循环去掉任何一个都正常,二个都在就出错:a child row was mutilple parents.

 

Dim dt1 As DataTable = DataTables("凭证")
Dim dt2 As DataTable = DataTables("凭证明细")
Dim Customers As List(Of String)
Customers = dt1.GetUniqueValues("", "凭证类别")

With Tables("凭证")
For Each Customer As String In Customers
     Dim r As  Row = .Addnew()
     r("凭证类别") = Customer
     r("凭证ID") = "合计"
Next
End With

 

With Tables("凭证明细")
For Each Customer As String In Customers
     Dim r2 As  Row = .Addnew()
     r2("凭证类别") = Customer
     r2("凭证ID") = "合计"
Next
End With


--  作者:狐狸爸爸
--  发布时间:2011/5/19 17:40:00
--  

看这一节的最后一段话:

 

http://help.foxtable.com/topics/0106.htm