以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- SQLGetComboListString 根据取值列排序无效? (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=94934) |
-- 作者:bahamute -- 发布时间:2017/1/5 16:42:00 -- SQLGetComboListString 根据取值列排序无效? 帮助中说, Sort: 可选参数,指定排序列,如果省略,则根据取值列排序,通常无需设置。 但是如下语句,获得的下拉列表没有任何排序效果 Dim s As String = DataTables("报盘记录").SQLGetComboListString("年月") 想要年月降序,有什么办法?
|
-- 作者:有点色 -- 发布时间:2017/1/5 16:47:00 -- 先试试
Dim s As String = DataTables("报盘记录").SQLGetComboListString("年月", "", "年月")
如果不行,你就需要用GetComboListString了,先用sqlcommand得到临时表dt,再获取排序的GetComboListString |
-- 作者:fjlclxj -- 发布时间:2017/1/5 20:53:00 -- 降序加上desc |
-- 作者:bahamute -- 发布时间:2017/1/5 20:54:00 -- 2楼方式无效 [此贴子已经被作者于2017/1/5 20:54:36编辑过]
|
-- 作者:有点色 -- 发布时间:2017/1/5 21:04:00 -- 以下是引用bahamute在2017/1/5 20:54:00的发言:
2楼方式无效 [此贴子已经被作者于2017/1/5 20:54:36编辑过]
用sqlcommand得到临时表,然后再得到你要的东西。 |