mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 20:00:16 +08:00
SaveModifications() should process all virtual rows, but ignore just inserted ones, so we can call InsertRow and then SaveModifications for yet modified rows. Fixes issue #1918.
This commit is contained in:
@ -2049,16 +2049,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end else
|
end else
|
||||||
Connection.Query('UPDATE '+QuotedDbAndTableName+' SET '+sqlUpdate+' WHERE '+GetWhereClause);
|
Connection.Query('UPDATE '+QuotedDbAndTableName+' SET '+sqlUpdate+' WHERE '+GetWhereClause);
|
||||||
// TODO: Reload real row data from server if keys allow that???
|
// Reset modification flags
|
||||||
except
|
|
||||||
on E:EDatabaseError do begin
|
|
||||||
Result := False;
|
|
||||||
MessageDlg(E.Message, mtError, [mbOK], 0);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
// Reset modification flags
|
|
||||||
if Result then begin
|
|
||||||
for i:=0 to ColumnCount-1 do begin
|
for i:=0 to ColumnCount-1 do begin
|
||||||
Cell := Row[i];
|
Cell := Row[i];
|
||||||
Cell.OldText := Cell.NewText;
|
Cell.OldText := Cell.NewText;
|
||||||
@ -2066,6 +2057,12 @@ begin
|
|||||||
Cell.Modified := False;
|
Cell.Modified := False;
|
||||||
end;
|
end;
|
||||||
Row.Inserted := False;
|
Row.Inserted := False;
|
||||||
|
// TODO: Reload real row data from server if keys allow that???
|
||||||
|
except
|
||||||
|
on E:EDatabaseError do begin
|
||||||
|
Result := False;
|
||||||
|
MessageDlg(E.Message, mtError, [mbOK], 0);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
Reference in New Issue
Block a user