| View previous topic :: View next topic |
| Author |
Message |
Dennis Landi Guest
|
Posted: Fri Aug 08, 2003 8:32 pm Post subject: tClientDataset's default index |
|
|
Here a quote concerning the default index of tClientDataset.IndexName:
<quote>
Use IndexName to specify an alternative index for a dataset. If IndexName is
empty, a dataset's sort order is based on the IndexFieldNames property or on
its default ordering in the data packet. Default ordering is determined by
the predefined index, DEFAULT_ORDER.
</quote>
Question: is DEFAULT_ORDER the original sequence of the records as they
were added to the dataset, as if there were no index applied at all? Or
does "default order" apply to some other ordering automatically applied? (I
am hoping its the former)
Thanks.
-dennis
|
|
| Back to top |
|
 |
Craig Stuntz [TeamB] Guest
|
Posted: Fri Aug 08, 2003 8:56 pm Post subject: Re: tClientDataset's default index |
|
|
Dennis Landi wrote:
| Quote: | Question: is DEFAULT_ORDER the original sequence of the records as
they were added to the dataset, as if there were no index applied at
all? Or does "default order" apply to some other ordering
automatically applied? (I am hoping its the former)
|
If you want the former and a DSP is supplying the data, set
TDatasetProvier.Options.poRetainServerOrder.
-Craig
--
Craig Stuntz [TeamB] . Vertex Systems Corp. . Columbus, OH
Delphi/InterBase Weblog : http://delphi.weblogs.com
InterBase in Multi-tier World -- Use multiple RDMs, IB features in
your appserver: http://delphi.weblogs.com/stories/storyReader$195
|
|
| Back to top |
|
 |
Dennis Landi Guest
|
Posted: Fri Aug 08, 2003 8:57 pm Post subject: Re: tClientDataset's default index |
|
|
"Craig Stuntz [TeamB]" <cstuntz (AT) vertexsoftware (DOT) com> wrote in message
| Quote: | If you want the former and a DSP is supplying the data, set
TDatasetProvier.Options.poRetainServerOrder.
|
In this case it is strictly an xml file-based cds.
|
|
| Back to top |
|
 |
Craig Stuntz [TeamB] Guest
|
Posted: Mon Aug 11, 2003 2:08 pm Post subject: Re: tClientDataset's default index |
|
|
Dennis Landi wrote:
| Quote: | In this case it is strictly an xml file-based cds.
|
In that case I'd recommend timestamping the records as you add them.
-Craig
--
Craig Stuntz [TeamB] . Vertex Systems Corp. . Columbus, OH
Delphi/InterBase Weblog : http://delphi.weblogs.com
Useful articles about InterBase and Delphi development:
http://delphi.weblogs.com/articles
|
|
| Back to top |
|
 |
Dennis Landi Guest
|
Posted: Wed Aug 20, 2003 6:47 pm Post subject: Re: tClientDataset's default index |
|
|
Thanks!
"Dave Rowntree" <daver (AT) spam_offbrookswood (DOT) co.uk> wrote
| Quote: | "Dennis Landi" <none[at]none.com> wrote:
Here a quote concerning the default index of tClientDataset.IndexName:
quote
Use IndexName to specify an alternative index for a dataset. If IndexName
is
empty, a dataset's sort order is based on the IndexFieldNames property or
on
its default ordering in the data packet. Default ordering is determined
by
the predefined index, DEFAULT_ORDER.
/quote
Question: is DEFAULT_ORDER the original sequence of the records as they
were added to the dataset, as if there were no index applied at all? Or
does "default order" apply to some other ordering automatically applied?
(I
am hoping its the former)
DEFAULT_ORDER is:
- The order that records were received in the DataPacket (where the
CDS is either supplied from a DSP, or is opened with a CDS.Data :=
MyDataPacket).
- The order that records were added to the CDS.
Talking about a MyBase app ...
If you set CDS.LogChanges := False directly after opening the CDS, the
above consistently applies.
If you have CDS.LogChanges = True, the behaviour changes. If you
modify an existing record, it moves to the end of the dataset. If you
insert (as oposed to append) a new record, it appears where inserted
*until* you save and re-open the CDS, when it will appear as if
appended.
--
Dave Rowntree
|
|
|
| Back to top |
|
 |
|