From 125ed5b264ef79a45ab973f7c65bf73eba7a766e Mon Sep 17 00:00:00 2001 From: "rosenfield.albert" Date: Tue, 12 Aug 2008 02:43:15 +0000 Subject: [PATCH] Bugfix: (regression) Format()'ing the query caused % operators in filters to break. --- source/childwin.pas | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/childwin.pas b/source/childwin.pas index c06c3f48..45690c1b 100644 --- a/source/childwin.pas +++ b/source/childwin.pas @@ -1355,8 +1355,6 @@ begin if Filter <> '' then sl_query.Add('WHERE ' + Filter); // Apply custom ORDER BY if detected in registry if sorting <> '' then sl_query.Add( sorting ); - // Apply LIMIT - sl_query.Add('LIMIT %d, %d'); DataGridCurrentQuery := sl_query.Text; SetLength(FDataGridResult.Rows, DataGrid.RootNodeCount); @@ -5484,7 +5482,7 @@ begin start := Node.Index - (Node.Index mod GridMaxRows); limit := DataGrid.RootNodeCount - start; if limit > GridMaxRows then limit := GridMaxRows; - query := Format(DataGridCurrentQuery, [start, limit]); + query := DataGridCurrentQuery + Format(' LIMIT %d, %d', [start, limit]); // start query MainForm.ShowStatus('Retrieving data...');