以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 高效更新流水账 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=107603) |
-- 作者:kaituozhe -- 发布时间:2017/10/4 9:24:00 -- 高效更新流水账 Dim nms As New List(Of String) End With 以上高效更新流水账的代码,提示如下错误,应该怎么修改? 无法将类型为“System.Collections.Generic.List`1[System.String[]]”的对象强制转换为类型“System.Collections.Generic.List`1[System.String]”。
|
-- 作者:有点蓝 -- 发布时间:2017/10/4 11:27:00 -- Dim nms As New List(Of String()) Dim drs As New List(of DataRow) With DataTables("明细账") nms = .GetValues("科目编号|公司名称") For Each nm As String() In nms \'找出每个产品的第一行数据, 添加到集合drs中 drs.Add(.Find("科目编号 = \'" & nm(0) & "\'and 公司名称 = \'" & nm(1) & "\'", "[_SortKey]")) Next For Each dr As DataRow In drs .DataCols("借方金额").RaiseDataColChanged(dr) Next End With
|