以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 移动开发表格数据筛选 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=160703) |
-- 作者:一笑 -- 发布时间:2021/2/18 11:09:00 -- 移动开发表格数据筛选 以下代码无法正确筛选出数据,求解,谢谢! Dim u As String = e.Cookies("username") Dim UserName1 As String UserName1 = DecryptText(u,"123","123") Dim cmd As New SQLCommand cmd.C \'记得设置数据源名称 cmd.CommandText = "SelecXX Count(*) From {工作单}" Dim Count As Integer = cmd.ExecuteScalar() \'获取总的行数 Dim Pages As Integer = Math.Ceiling(Count/PageRows) \'计算出总页数 cmd.CommandText = "Selec * From (SelecXX Row_Number() Over(Order by 完成时间) As [NO.],[_Identify],责任单位,完成时间,工作内容,责任人, From 工作单) As a " cmd.CommandText = cmd.CommandText & " Where [NO.]>= " & StartRow & " And [NO.] <= " & EndRow & "And 责任人= \'" & Username1 & "\'" |
-- 作者:有点蓝 -- 发布时间:2021/2/18 11:17:00 -- cmd.CommandText = "SelecXX Count(*) From {工作单} And 责任人= \'" & Username1 & "\'" Dim Count As Integer = cmd.ExecuteScalar() \'获取总的行数 Dim Pages As Integer = Math.Ceiling(Count/PageRows) \'计算出总页数 cmd.CommandText = "Selec * From (SelecXX Row_Number() Over(Order by 完成时间) As [NO.],[_Identify],责任单位,完成时间,工作内容,责任人 From 工作单 where 责任人= \'" & Username1 & "\') As a " cmd.CommandText = cmd.CommandText & " Where [NO.]>= " & StartRow & " And [NO.] <= " & EndRow
|