根据帮助输入代码
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
dtb.Build()
For Each
v As String In
DataTables("表A").GetValues("姓名")
Dim dr1 As
DataRow = DataTables("表B").AddNew()
dr1("姓名") = v
For
Each dr2 As
DataRow
In
DataTables("表A").Select("姓名 = '" & v &
"'")
dr1(dr2("课程")) = dr2("分数")
Next
Next
MainTable = Tables("表B")
执行出错,为什么?