L libaoliang Unregistered / Unconfirmed GUEST, unregistred user! 2010-08-05 #1 adotable1.sort:='字段名'; 和 adotable1.indexfieldbyname:='字段名';可以实现升序排序,怎么降序排序呢?
J JC不懂 Unregistered / Unconfirmed GUEST, unregistred user! 2010-08-05 #2 ADOTable1.Sort:=Column.FieldName+' DESC';
J JC不懂 Unregistered / Unconfirmed GUEST, unregistred user! 2010-08-05 #5 Column.FieldName+' DESC'你中间加空格了么?
L libaoliang Unregistered / Unconfirmed GUEST, unregistred user! 2010-08-05 #6 加了,这点还能不懂,关键是你是随意想象的吧,可能没有这种语法
J JC不懂 Unregistered / Unconfirmed GUEST, unregistred user! 2010-08-05 #8 你不会就直接这样Column.FieldName+' DESC'写上了吧3???
J JC不懂 Unregistered / Unconfirmed GUEST, unregistred user! 2010-08-05 #9 你的吧Column.FieldName换成你自己要排序的字段名称。。。
L libaoliang Unregistered / Unconfirmed GUEST, unregistred user! 2010-08-05 #10 这样写的:adotable1.sort:='字段名';和adotable1.indexfieldbyname:='字段名';都对,但adotable1.sort:='字段名'+' DESC';就不对
J JC不懂 Unregistered / Unconfirmed GUEST, unregistred user! 2010-08-05 #12 你用的是ado控件不?还有你的Delphi是什么版本啊?你google下adotable1.sort...我用的delphi2007的 adotable控件是可以实现的
L libaoliang Unregistered / Unconfirmed GUEST, unregistred user! 2010-08-05 #13 ADOTable1.Sort:=Column.FieldName+' DESC'; 把 sk 字段名写在哪里呢?解决问题后立即散分!
J JC不懂 Unregistered / Unconfirmed GUEST, unregistred user! 2010-08-05 #15 Column.FieldName 是指adotable控件与你SK字段绑定的那个列对象的FieldName属性值
L libaoliang Unregistered / Unconfirmed GUEST, unregistred user! 2010-08-05 #16 那你具体写出来看看,我觉得这样写也不对:adotable1.sort:=fieldvalues['sk']+' DESC';