mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 09:19:39 +01:00 
			
		
		
		
	
							parent
							
								
									86eb409c3a
								
							
						
					
					
						commit
						1d226830f2
					
				@ -1275,7 +1275,7 @@ end;
 | 
			
		||||
Procedure TDataset.DoInsertAppend(DoAppend : Boolean);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  procedure DoInsert;
 | 
			
		||||
  procedure DoInsert(DoAppend : Boolean);
 | 
			
		||||
 | 
			
		||||
  Var BookBeforeInsert : TBookmarkStr;
 | 
			
		||||
      TempBuf : pointer;
 | 
			
		||||
@ -1286,15 +1286,19 @@ Procedure TDataset.DoInsertAppend(DoAppend : Boolean);
 | 
			
		||||
  If FRecordcount > 0 then
 | 
			
		||||
    BookBeforeInsert:=Bookmark;
 | 
			
		||||
 | 
			
		||||
  if FActiveRecord < FRecordCount-1 then
 | 
			
		||||
  if not DoAppend then
 | 
			
		||||
    begin
 | 
			
		||||
    if FRecordCount > 0 then
 | 
			
		||||
      begin
 | 
			
		||||
      TempBuf := FBuffers[FBuffercount];
 | 
			
		||||
      move(FBuffers[FActiveRecord],FBuffers[FActiveRecord+1],(Fbuffercount-FActiveRecord)*sizeof(FBuffers[0]));
 | 
			
		||||
      FBuffers[FActiveRecord]:=TempBuf;
 | 
			
		||||
      end;
 | 
			
		||||
    end
 | 
			
		||||
  else if FRecordcount=FBuffercount then
 | 
			
		||||
    shiftbuffersbackward
 | 
			
		||||
  else begin
 | 
			
		||||
  else
 | 
			
		||||
    begin
 | 
			
		||||
    if FRecordCount>0 then
 | 
			
		||||
      inc(FActiveRecord);
 | 
			
		||||
    end;
 | 
			
		||||
@ -1339,8 +1343,7 @@ begin
 | 
			
		||||
{$ifdef dsdebug}
 | 
			
		||||
    Writeln ('going to insert mode');
 | 
			
		||||
{$endif}
 | 
			
		||||
 | 
			
		||||
    DoInsert;
 | 
			
		||||
    DoInsert(false);
 | 
			
		||||
    end
 | 
			
		||||
  else
 | 
			
		||||
    begin
 | 
			
		||||
@ -1352,7 +1355,7 @@ begin
 | 
			
		||||
    GetPriorRecords;
 | 
			
		||||
    if FRecordCount>0 then
 | 
			
		||||
      FActiveRecord:=FRecordCount-1;
 | 
			
		||||
    DoInsert;
 | 
			
		||||
    DoInsert(True);
 | 
			
		||||
    SetBookmarkFlag(ActiveBuffer,bfEOF);
 | 
			
		||||
    FBOF :=False;
 | 
			
		||||
    FEOF := true;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user