Do not LEFT(CAST(.. data type "image" in MSSQL. Fixes issue #3355.

This commit is contained in:
Ansgar Becker
2013-10-04 04:21:21 +00:00
parent dbcbb09186
commit 126a1e1c36

View File

@ -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