以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  GetComboListString的时候可以不排序吗?  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=61646)

--  作者:affixed
--  发布时间:2014/12/16 15:30:00
--  GetComboListString的时候可以不排序吗?
请问GetComboListString的时候可以不排序吗?
我就想要原始数据库中的顺序。

现在通过GetComboListString的到的字符串是自动升序的。

谢谢!

--  作者:有点甜
--  发布时间:2014/12/16 15:32:00
--  

指定排序列是 "_Sortkey" 即可,第三个参数

 

http://www.foxtable.com/help/topics/1435.htm

 


--  作者:affixed
--  发布时间:2014/12/16 16:29:00
--  
第三个参数如何设置才能达到不排序的目的呢?
--  作者:czy
--  发布时间:2014/12/16 16:35:00
--  
DataTables("表名").GetComboListString("列名","","_Identify")
--  作者:有点甜
--  发布时间:2014/12/16 16:37:00
--  
Dim s As String  = DataTables("订单").GetComboListString("客户", "", "_Sortkey")
--  作者:affixed
--  发布时间:2014/12/16 17:06:00
--  
试了,不行啊。报错,找不到"_Sortkey"列。
--  作者:有点甜
--  发布时间:2014/12/16 17:07:00
--  
Dim s As String  = DataTables("订单").GetComboListString("客户", "", "_Identify")
--  作者:affixed
--  发布时间:2014/12/16 17:07:00
--  
---------------------------
错误
---------------------------
自定义函数"F_CreatDataMap"执行出错,错误信息如下:



System.IndexOutOfRangeException: 无法找到列 _Sortkey。

   在 Microsoft.VisualBasic.CompilerServices.Symbols.Container.InvokeMethod(Method TargetProcedure, Object[] Arguments, Boolean[] CopyBack, BindingFlags Flags)

   在 Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack)

   在 UserCode.AvVOuJBzZZa91AOj8(Object[] Args)
---------------------------
确定   
---------------------------


--  作者:affixed
--  发布时间:2014/12/16 17:09:00
--  
悲剧了,我的数据库里没有_Identify这列。
--  作者:有点甜
--  发布时间:2014/12/16 17:11:00
--  

 那没办法了,你只能指定按照某一列排序。

 

 或者你可以加一列_Sortkey列 http://www.foxtable.com/help/topics/1797.htm