From 126a1e1c3624a7519fcd418ab170ed1a15ddf9d9 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Fri, 4 Oct 2013 04:21:21 +0000 Subject: [PATCH] Do not LEFT(CAST(.. data type "image" in MSSQL. Fixes issue #3355. --- source/main.pas | 1 + 1 file changed, 1 insertion(+) diff --git a/source/main.pas b/source/main.pas index 01531f88..e08af9e2 100644 --- a/source/main.pas +++ b/source/main.pas @@ -4590,6 +4590,7 @@ begin if not DataGridFullRowMode and (KeyCols.Count > 0) // We need a sufficient key to be able to load remaining row data and (c.DataType.Category in [dtcText, dtcBinary]) + and (not (c.DataType.Index in [dtImage])) // Cannot cast certain data types and (not IsKeyColumn) // We need full length of any key column, so DataGridLoadFullRow() has the chance to fetch the right row and ((ColLen > GRIDMAXDATA) or (ColLen = 0)) // No need to blow SQL with LEFT() if column is shorter anyway then begin