[fpc-devel] Bug 5049: Record insert at eof in TSQLQuery

Joost van der Sluis joost at cnoc.nl
Sun Apr 30 13:20:18 CEST 2006


On Thu, 2006-04-27 at 17:18 +0200, Martin Schreiber wrote:
> On Wednesday 26 April 2006 00.43, Joost van der Sluis wrote:
> > Keep me informed.
> > Ik you find something that doesn't sound logical to you, just say so.

> dataset.inc:
> 
> Procedure TDataset.DoInsertAppend(DoAppend : Boolean);
>   procedure DoInsert;
> [...]
>   if FActiveRecord < FRecordCount-1 then <<<<<< !!!!!!
>     begin
>     TempBuf := FBuffers[FBuffercount];
>     move(FBuffers[FActiveRecord],FBuffers[FActiveRecord+1],
> (Fbuffercount-FActiveRecord)*sizeof(FBuffers[0]));
>     FBuffers[FActiveRecord]:=TempBuf;
>     end
>   else if FRecordcount=FBuffercount then
>     shiftbuffersbackward              <<<<<<<<<<<<<<<<<<
>   else begin
>     if FRecordCount>0 then
>     inc(FActiveRecord);
>   end;
> 
> Inserted records are displayed *after* the current record if the current 
> record is at end of buffer!

I think i've fixed this in revision 3381. But this influences all
TDataset descendents. Can you have a look at it?

Joost.




More information about the fpc-devel mailing list