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


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

主题:[求助]追加行

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


加好友 发短信
等级:超级版主 帖子:111393 积分:567029 威望: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(",") & ")")

 回到顶部