More exact formulation:
TSQLQuery.Last;
TSQLQuery.Insert;
TSQLQuery.Post;The new record is not the last record.
It is at the same position as if
TSQLQuery.Last;
TSQLQuery.Prior;
TSQLQuery.Insert;
TSQLQuery.Post;Martin

Mailing lists / fpc-devel / 2006-04
9 messages · 3 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
More exact formulation:
TSQLQuery.Last;
TSQLQuery.Insert;
TSQLQuery.Post;The new record is not the last record.
It is at the same position as if
TSQLQuery.Last;
TSQLQuery.Prior;
TSQLQuery.Insert;
TSQLQuery.Post;Martin
That is correct. It should be the last-but-one.
Michael.
It seems there are other effects with the new TBufDataset which deceived me. I will do more tests.
Martin
Keep me informed.
Ik you find something that doesn't sound logical to you, just say so.
Joost.
Joost van der Sluis wroteKeep me informed. Ik you find something that doesn't sound logical to you, just say so.
One problem is in internalfirst.
Old:
procedure TBufDataset.InternalFirst;
begin
FBCurrentRecord := -1;
FIsEOF := false;
end;
New:
procedure TBufDataset.InternalFirst;
begin
FCurrentRecBuf := FFirstRecBuf;
end;-> TBufDataset returns recorddata of recno 1+ instead of recno 0+ by call of GetNextRecords in TDataset.First.
Martin
Keep me informed. Ik you find something that doesn't sound logical to you, just say so.…
Joost van der Sluis wroteKeep 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!
Martin
One problem is in internalfirst. Old: procedure TBufDataset.InternalFirst; begin…
fixed in revision 3364
dataset.inc: Procedure TDataset.DoInsertAppend(DoAppend : Boolean); procedure DoInsert;…
I think i've fixed this in revision 3381. But this influences all TDataset descendents. Can you have a look at it?
Joost.
It seems OK for me. Thanks!
Could you please change the wrong values of bug 5048 to category FCL and Version 2.0.3?
Martin