[fpc-devel] Patch to remove useless bookmark store in TDataset.DoInsertAppend
Joost van der Sluis
joost at cnoc.nl
Mon Jul 25 10:44:18 CEST 2005
On Sat, 2005-07-23 at 18:14 -0300, Luiz Américo wrote:
> As already commented in the code, the bookmarking done inside
> TDataset.DoInsertAppend is useless, not to say buggy.
> It makes 2 records to have the same bookmark data but this is not
> noticed because the bookmarkdata is set to the correct value after
> Post->Resync.
I didn't dare to remove it, it could give strange results...
> In TDBF, if the bookmark is get just after a insert call this bookmark
> will point to the previous record (see the attached example).
>
> The patch remove this code and also refactory a if statement.
>
> Unfortunately, after applying the patch if a bookmark is get after
> insert this bookmark points to the first record. This occurs because
> TDBF inits a buffer with BookMarkData=0 and BookMarkFlag=bfCurrent
> instead of bfInserted (this makes bookmarkavailable returns true)
>
> As far as i can understand it seems that is not allowed to get a
> bookmark in a not posted record, is it?
Maybe that if the record is posted, it get a new bookmark? Can you test
that? If that's so, i would say we could apply your patch, and look if
someone reports that there's something broken...
--
Met vriendelijke groeten,
Joost van der Sluis
CNOC Informatiesystemen en Netwerken
http://www.cnoc.nl
More information about the fpc-devel
mailing list