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

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (Desktop)
View previous topic :: View next topic  
Author Message
Phil Manger
Guest





PostPosted: Mon Dec 19, 2005 5:09 am    Post subject: TClientDataSet Reply with quote



Does anybody know where I can get some definitive CORRECT documentation
for TClientDataSet? I've been using TClientDataSet for over a year, and
it's been one frustrating headache after another. There are so many
things that don't work the way the on-line documentation says they're
supposed to work that I've just about given up reading it, and I've had
to come up with so many work-arounds I'm about ready to throw in the
towel and just derive my own database classes from the C++ library.

Some (but by no means all) of the issues I've had to deal with include:

(1) Data entered through the DBComboBox control sometimes ends up not
getting into the record at all, or getting into the wrong record.

(2) On nested datasets, using SetRangeStart() and SetRangeEnd() to
define a subset of records sometimes works and sometimes doesn't -- even
in the same application using the same data.

(3) When iterating through a set of records defined with SetRange() on
a cloned cursor of a nested dataset, if I update a record in another
nested dataset (not the source), sometimes I (a) lose the range (the
record count jumps to the total number of records in the nested
dataset); and (b) get the "at beginning of table" exception when I try
to iterate to the next record, even though I am not at the beginning of
the table.

(4) SetKey()-GoToNearest() followed by a while loop also will sometimes
result in the problem described in 3.b.

(5) Setting KeyExclusive always results in a "dataset not in edit or
insert mode" error except when it immediately follows a SetRangeStart()
or SetRangeEnd() function call.

(6) Attempting to read the value of KeyExclusive always raises the
above exception no matter what I'm doing -- even if I put the dataset in
edit mode just before trying to read KeyExclusive.

(7) Sometimes a cloned cursor won't recognize an index defined on the
source clientdataset.

(Cool If a nested dataset has a lookup field that gets its values from a
field in another nested dataset that has the same master dataset,
creating the master dataset can result in one of the nested datasets
copying all its field definitions from the other. Again, the problem is
not consistent -- sometimes it happens, sometimes it doesn't.

(9) Other problems I can't think of at the moment.

One of the work-arounds that has given me some modest success is to
instantiate a class that holds the most important information about the
clientdataset (whether it's filtered and the text of the filter; the
current index name or index fields; the record number, its state, etc.),
go do whatever has to be done on the dataset, and then recover the
information from the object. I say "modest", because I haven't figured
out how to get range information. However, using this method, I can
usually avoid cloning a cursor on the dataset and instead operate on it
directly and then get back to where I started after I'm finished.

I really don't want to abandon clientdatasets. They have some really
nice features, if they would only work the way they're supposed to work,
and, also, I need them to use dbExpress. But I'd really like some
better documentation. Anybody know of any?

Phil Manger
Back to top
Phil Manger
Guest





PostPosted: Mon Dec 19, 2005 12:41 pm    Post subject: Re: TClientDataSet Reply with quote



Phil Manger wrote:
Quote:
Does anybody know where I can get some definitive CORRECT documentation
for TClientDataSet? I've been using TClientDataSet for over a year, and
it's been one frustrating headache after another. There are so many
things that don't work the way the on-line documentation says they're
supposed to work that I've just about given up reading it, and I've had
to come up with so many work-arounds I'm about ready to throw in the
towel and just derive my own database classes from the C++ library.

Some (but by no means all) of the issues I've had to deal with include:

(1) Data entered through the DBComboBox control sometimes ends up not
getting into the record at all, or getting into the wrong record.

(2) On nested datasets, using SetRangeStart() and SetRangeEnd() to
define a subset of records sometimes works and sometimes doesn't -- even
in the same application using the same data.

(3) When iterating through a set of records defined with SetRange() on
a cloned cursor of a nested dataset, if I update a record in another
nested dataset (not the source), sometimes I (a) lose the range (the
record count jumps to the total number of records in the nested
dataset); and (b) get the "at beginning of table" exception when I try
to iterate to the next record, even though I am not at the beginning of
the table.

(4) SetKey()-GoToNearest() followed by a while loop also will sometimes
result in the problem described in 3.b.

(5) Setting KeyExclusive always results in a "dataset not in edit or
insert mode" error except when it immediately follows a SetRangeStart()
or SetRangeEnd() function call.

(6) Attempting to read the value of KeyExclusive always raises the
above exception no matter what I'm doing -- even if I put the dataset in
edit mode just before trying to read KeyExclusive.

(7) Sometimes a cloned cursor won't recognize an index defined on the
source clientdataset.

(Cool If a nested dataset has a lookup field that gets its values from a
field in another nested dataset that has the same master dataset,
creating the master dataset can result in one of the nested datasets
copying all its field definitions from the other. Again, the problem is
not consistent -- sometimes it happens, sometimes it doesn't.

(9) Other problems I can't think of at the moment.

One of the work-arounds that has given me some modest success is to
instantiate a class that holds the most important information about the
clientdataset (whether it's filtered and the text of the filter; the
current index name or index fields; the record number, its state, etc.),
go do whatever has to be done on the dataset, and then recover the
information from the object. I say "modest", because I haven't figured
out how to get range information. However, using this method, I can
usually avoid cloning a cursor on the dataset and instead operate on it
directly and then get back to where I started after I'm finished.

I really don't want to abandon clientdatasets. They have some really
nice features, if they would only work the way they're supposed to work,
and, also, I need them to use dbExpress. But I'd really like some
better documentation. Anybody know of any?

Phil Manger

Oh, to the other stuff, you can add this: where can I find some DECENT
documentation about variants, variant arrays, etc.? I've found that
following the examples given in the on-line documentation often triggers
exceptions.

Phil Manger

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (Desktop) 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.