Foxtable(狐表)用户栏目专家坐堂 → 怎么在极码中取值


  共有2155人关注过本帖树形打印复制链接

主题:怎么在极码中取值

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


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2015/7/13 9:34:00 [显示全部帖子]

Dim str1, str2, str3 As String
For Each dr As DataRow In DataTables("表A").Select("")
    Dim ary() As String = dr("第一列").Split(".")
    Select Case ary.Length
        Case 1
            str1 &= dr("第二列") & "|"
        Case 2
            str2 &= dr("第二列") & "|"
        Case 3
            str3 &= dr("第二列") & "|"
    End Select
Next
msgbox(str1.Trim("|"))
msgbox(str2.Trim("|"))
msgbox(str3.Trim("|"))

 回到顶部
帅哥哟,离线,有人找我吗?
大红袍
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2015/7/14 9:07:00 [显示全部帖子]

 看2楼的代码啊,编写代码合成字符串啊。

 回到顶部
帅哥哟,离线,有人找我吗?
大红袍
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2015/7/14 9:31:00 [显示全部帖子]

Dim str1 As String = "2"

Dim str2 As String = ""

For Each dr As DataRow In DataTables("表A").Select("第一列 like '" & str1 & ".%'")
    Dim ary() As String = dr("第一列").Split(".")
    Select Case ary.Length

        Case 2
            str2 &= dr("第二列") & "|"
    End Select
Next

msgbox(str2.Trim("|"))


 回到顶部