Foxtable(狐表)用户栏目专家坐堂 → 帮我看看哪里错了?


  共有2844人关注过本帖平板打印复制链接

主题:帮我看看哪里错了?

帅哥哟,离线,有人找我吗?
hongye
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:一尾狐 帖子:437 积分:2943 威望:0 精华:0 注册:2011/3/15 12:49:00
帮我看看哪里错了?  发帖心情 Post By:2021/3/22 14:50:00 [只看该作者]

Dim sa1 As String = "A01"
Dim fsc As String = "开piao数据"
Dim drU As DataRow
drU = DataTables("表C").Find("[执行编号] = '" & sa1 & "' And [分类] = '" & fsc & "'")
Dim dzml1 As String = drU("主文件夹目录")
Dim dzml2 As String = drU("次文件夹目录")
For Each f As String In FileSys.GetFiles(dzml2)
    If f.EndsWith(".log") Then
        Dim txt As String = FileSys.ReadAllText(f, Encoding.Default)
        Dim xmlDoc As New System.XML.XmlDocument
        xmlDoc.Loadxml(txt.Trim)
        Dim ndList  = xmlDoc.GetElementsByTagName("comment")
        For Each dr As object In ndlist
            Dim fpdm As String
            Dim fphm As String
            Dim ghdwmc As String
            Dim ghdwdzdh As String
            Dim ghdwsbh As String
            Dim ghdwyhzh As String
            Dim hjje As String
            Dim hjse As String
            Dim jshj As String
            Dim bz As String
            For i As Integer = 0 To ndList.count - 1
                If ndList(i).Item("fpdm") IsNot Nothing Then fpdm = ndList(i).Item("fpdm").InnerText
                If ndList(i).Item("fphm") IsNot Nothing Then fphm = ndList(i).Item("fphm").InnerText
                If ndList(i).Item("ghdwmc") IsNot Nothing Then ghdwmc = ndList(i).Item("ghdwmc").InnerText
                If ndList(i).Item("ghdwdzdh") IsNot Nothing Then ghdwdzdh = ndList(i).Item("ghdwdzdh").InnerText
                If ndList(i).Item("ghdwsbh") IsNot Nothing Then ghdwsbh = ndList(i).Item("ghdwsbh").InnerText
                If ndList(i).Item("ghdwyhzh") IsNot Nothing Then ghdwyhzh = ndList(i).Item("ghdwyhzh").InnerText
                If ndList(i).Item("hjje") IsNot Nothing Then hjje = ndList(i).Item("hjje").InnerText
                If ndList(i).Item("hjse") IsNot Nothing Then hjse = ndList(i).Item("hjse").InnerText
                If ndList(i).Item("jshj") IsNot Nothing Then jshj = ndList(i).Item("jshj").InnerText
                If ndList(i).Item("bz") IsNot Nothing Then bz = ndList(i).Item("bz").InnerText
            Next
            Dim ndList1  = xmlDoc.GetElementsByTagName("fyxm")(0).ChildNodes
            For i As Integer = 0 To ndList.count - 1
                Dim spmc As String = ndList1(i).Item("spmc").InnerText
                Dim ggxh As String = ndList1(i).Item("ggxh").InnerText
                Dim sl As String = ndList1(i).Item("sl").InnerText
                Dim se As String = ndList1(i).Item("se").InnerText
                Dim dw As String = ndList1(i).Item("dw").InnerText
                Dim spsl As String = ndList1(i).Item("spsl").InnerText
                Dim dj As String = ndList1(i).Item("dj").InnerText
                Dim je As String = ndList1(i).Item("je").InnerText
                Dim r As Row = Tables("表B").AddNew
                r("第一列") = fpdm
                r("第二列") = fphm
                r("第三列") = ghdwmc
                r("第四列") = spmc
                r("第五列") = ggxh
                r("第六列") = dw
                r("第七列") = spsl
                r("第八列") = dj
                r("第十列") = "str"
            Next
        Next
    End If
Next

图片点击可在新窗口打开查看此主题相关图片如下:01.jpg
图片点击可在新窗口打开查看
 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:_2020-12-19.rar

这个代码应该怎么写啊



[此贴子已经被作者于2021/3/22 14:51:03编辑过]

 回到顶部
总数 28 1 2 3 下一页