Foxtable(狐表)用户栏目专家坐堂 → [求助]追加行


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

主题:[求助]追加行

帅哥,在线噢!
有点蓝
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:110792 积分:563898 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2019/2/20 15:59:00 [显示全部帖子]

Dim id As Integer = Tables("表A").Compute("max(_Identify)","类型='快速'")
Dim cmd As New SQLCommand
Dim dt As DataTable
cmd.ConnectionName = "数据源"
cmd.CommandText = "SELECT top 2 [_Identify] From {表A} where 类型='快速' and [_Identify] > " & id & " order by [_Identify]"
dt = cmd.ExecuteReader()
Dim ids As String = ""
For Each dr As Row In dt.DataRows
    ids = ids & "," & dr("_Identify")
Next

DataTables("表A").AppendLoad("[_Identify] in (" & ids.Trim(",") & ")")

 回到顶部