BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

tClientDataset's default index

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Multi-Tier)
View previous topic :: View next topic  
Author Message
Dennis Landi
Guest





PostPosted: Fri Aug 08, 2003 8:32 pm    Post subject: tClientDataset's default index Reply with quote



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





PostPosted: Fri Aug 08, 2003 8:56 pm    Post subject: Re: tClientDataset's default index Reply with quote



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





PostPosted: Fri Aug 08, 2003 8:57 pm    Post subject: Re: tClientDataset's default index Reply with quote




"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





PostPosted: Mon Aug 11, 2003 2:08 pm    Post subject: Re: tClientDataset's default index Reply with quote

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





PostPosted: Wed Aug 20, 2003 6:47 pm    Post subject: Re: tClientDataset's default index Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Multi-Tier) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.