On Wed, 3 May 2006, Joost van der Sluis wrote:

Hi all,

Two issues:
The RecNo in TBufDataset now counts from 0 to recordcount-1. If there's
no active record, it returns -1. But in Delphi (at least TIBQuery) it
counts from 1 to recordcount, and when there's no active record it gives
0.

I like the TBufDataset solution better. But should I change it to be
compatible with Delphi? Or could this be considered as 'TDataset
implementation-specific?'

I have a lot of code which counts on this 1-Recordcount behaviour.

From the Delphi help:

"Examine RecordCount to determine the total number of records
 currently in the dataset. If the PacketRecords property is
 greater than 0, the value for RecordCount may change as a
 user scrolls through the data and additional data packets
 are fetched from the provider.

 Applications can use this property with RecNo to iterate through all
 the records in a dataset, though typically record iteration is handled
 with calls to First, Last, MoveBy, and Prior."


Second issue is that if you do .append on an empty dataset, TBufDataset
immediately increases the recordcount and assigns a recno.
(Recordcount=1, recno=0)

But in Delphi, the recordcount is updated after the .post. The question
is again: should I make this Delphi-compatible, or not?

Again I have code which counts on this...

Michael.

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to