Dim dtb As New DataTableBuilder("表B")
dtb.AddDef("姓名", Gettype(String), 32)
For Each v As String In DataTables("表A").GetValues("课程")
dtb.AddDef(v, Gettype(Double))
Next
dim dt as DataTable = dtb.Build(ture)
For Each v As String In DataTables("表A").GetValues("姓名")
Dim dr1 As DataRow = dt.AddNew() 此处提示不存在表B的DataTables。
dr1("姓名") = v
For Each dr2 As DataRow In DataTables("表A").DataRows
If dr2("姓名") = v Then
dr1(dr2("课程")) = dr2("分数")
End If
Next
Next
这种用法没有意义,函数结束后,临时表也就不存在了,外部是用不了的