diff --git a/source/main.pas b/source/main.pas index 4081d515..060ccdd7 100644 --- a/source/main.pas +++ b/source/main.pas @@ -4712,7 +4712,8 @@ begin then begin case DBObj.Connection.Parameters.NetTypeGroup of ngMSSQL: Select := Select + ' LEFT(CAST(' + DBObj.Connection.QuoteIdent(c.Name) + ' AS NVARCHAR('+IntToStr(GRIDMAXDATA)+')), ' + IntToStr(GRIDMAXDATA) + '), '; - ngMySQL, ngPgSQL: Select := Select + ' LEFT(' + DBObj.Connection.QuoteIdent(c.Name) + ', ' + IntToStr(GRIDMAXDATA) + '), '; + ngMySQL: Select := Select + ' LEFT(' + DBObj.Connection.QuoteIdent(c.Name) + ', ' + IntToStr(GRIDMAXDATA) + '), '; + ngPgSQL: Select := Select + ' SUBSTR(' + DBObj.Connection.QuoteIdent(c.Name) + ', 0, ' + IntToStr(GRIDMAXDATA) + '), '; end; end else if DBObj.Connection.Parameters.IsMSSQL and (c.DataType.Index=dtTimestamp)