以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助]追加行 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=131218) |
-- 作者:OKK -- 发布时间:2019/2/20 15:30:00 -- [求助]追加行 _Identify 类型 1 快速 2 慢速 3 快速 4 慢速 5 快速 6 中速 7 中速 8 快速 9 快速 我想设计一个按钮,点击一下,加载两行类型列的值是快速的行,再点击一下,再加载两行类型列的值是快速的行,又再点击一下,又再加载两行类型列的值是快速的行... 请问怎么写代码? |
-- 作者:有点蓝 -- 发布时间: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(",") & ")")
|
-- 作者:OKK -- 发布时间:2019/2/20 17:36:00 -- 明白,谢谢了 |