diff --git a/source/main.pas b/source/main.pas index 931e066e..49ef3247 100644 --- a/source/main.pas +++ b/source/main.pas @@ -4643,13 +4643,13 @@ begin tbtnDataSorting.ImageIndex := 107; // Append LIMIT clause + Offset := 0; if RefreshingData and (vt.Tag <> VTREE_NOTLOADED_PURGECACHE) then begin case DBObj.Connection.Parameters.NetTypeGroup of ngMSSQL: Offset := 0; // Does not support offset in all server versions ngMySQL: Offset := DataGridResult.RecordCount; end; - end else - Offset := 0; + end; Select := DBObj.Connection.ApplyLimitClause('SELECT', Select, DatagridWantedRowCount-Offset, Offset); vt.BeginUpdate;