Board index » off-topic » TClientDataSet and PacketRecords

TClientDataSet and PacketRecords


2005-05-16 11:49:07 PM
off-topic9
I'm seeing some weird behavior with the TClientDataSet and the PacketRecords
property. Currently I have the packetRecords property set to 1. I then have
a grid hooked up to show the contents of the cds.
The problem I'm having is that the grid is not showing all the records. The
grid can show 25 rows. The cds has 8 records in it, but only 5 are shown. If
in the grid I arrow down to the insert row, then all "missing" rows appear.
If I change the PacketRecords property to N where N is greater than the
number of rows in the cds then all rows show.
Additionally I'm using the code provided by Cary Jensen to sort the cds.
When I do sort the cds, then it drops some rows and adds others. For
example, when the grid first opens only 5 rows are showing. I then click on
column B to sort it, and now only two rows show. I try column C and now 9
rows show.
Has anyone got any suggestions?
Delphi 6.240
Midas 7.1.1692.668
I originally started with Midas 6.0.10.157 and thought upgrading would help.
Preston
 
 

Re:TClientDataSet and PacketRecords

Somehow it's related to the indexs. I had a unique index defined at design
time. I also had the cds.IndexName set to that unique index.(see posting
"Can more than one index be active on a clientdataset").By clearing the
IndexName property my problem has gone away.
In case it helps here are the values. The ones marked hidden were the ones
that were not being shown until I entered the insert row.
1015
1016
1017
1018
1019
10152 <hidden>
10012 <hidden>
10014 <hidden>
Preston
 

Re:TClientDataSet and PacketRecords

Hi!
I am using CDS+DSP with PacketRecords := 10 and FetchOnDemand := True in a
TClientDataSet instance.
When I open the cds, I receive in a dbgrid, 10 records from database, but
they are all blanks!
When I set PacketRecords to -1, all records are send to me and they are not
blank. All data is displayed.
Is this a TClientDataSet bug?
How to solve?
Thanks!
 

{smallsort}