| View previous topic :: View next topic |
| Author |
Message |
Tony Guo Guest
|
Posted: Mon Apr 26, 2004 2:43 am Post subject: How to sort TClientDataset |
|
|
TAdoDataset have a method named "Sort",but TClientDataset don't have(or I
miss it). My question is how to sort the client dataset without re-fetch it
from the middle tier? because sometime the result may be very large.
|
|
| Back to top |
|
 |
Tony Guo Guest
|
Posted: Mon Apr 26, 2004 3:31 am Post subject: Re: How to sort TClientDataset |
|
|
I googled "tclientdataset sort" and found the solution is index.
"Tony Guo" <tony (AT) yiii (DOT) net> дÈëÓʼþ news:408c7646 (AT) newsgroups (DOT) borland.com...
| Quote: | TAdoDataset have a method named "Sort",but TClientDataset don't have(or I
miss it). My question is how to sort the client dataset without re-fetch
it
from the middle tier? because sometime the result may be very large.
|
|
|
| Back to top |
|
 |
Bill Todd (TeamB) Guest
|
Posted: Mon Apr 26, 2004 1:00 pm Post subject: Re: How to sort TClientDataset |
|
|
Another solution is to set the IndexFieldNames property to a semicolon
delimited list of the fields you want to sort by.
--
Bill (TeamB)
(TeamB cannot respond to questions received via email)
|
|
| Back to top |
|
 |
Himanshu Upadhyay Guest
|
Posted: Tue Apr 27, 2004 5:14 am Post subject: Re: How to sort TClientDataset |
|
|
In ADO with Sort you have to specify FieldName
same you can do in ClientDataset use IndexFieldName
"ClientDataset1.IndexFieldName := 'Field1; Field2....'"
or Create Index from Object Inspector and assign that index
to Clientdataset
Himanshu
"Tony Guo" <tony (AT) yiii (DOT) net> wrote
| Quote: | TAdoDataset have a method named "Sort",but TClientDataset don't have(or I
miss it). My question is how to sort the client dataset without re-fetch
it
from the middle tier? because sometime the result may be very large.
|
|
|
| Back to top |
|
 |
|