From 62a92ff577de0e58cbe263ab11e8ca129ba9d0c4 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Mon, 3 Jun 2013 04:55:47 +0000 Subject: [PATCH] Fix broken Unicode characters in MSSQL, data grid. Fixes issue #2873. --- source/main.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/main.pas b/source/main.pas index d7c4213f..2e488327 100644 --- a/source/main.pas +++ b/source/main.pas @@ -4333,7 +4333,7 @@ begin and ((ColLen > GRIDMAXDATA) or (ColLen = 0)) // No need to blow SQL with LEFT() if column is shorter anyway then begin case DBObj.Connection.Parameters.NetTypeGroup of - ngMSSQL: Select := Select + ' LEFT(CAST(' + DBObj.Connection.QuoteIdent(c.Name) + ' AS VARCHAR('+IntToStr(GRIDMAXDATA)+')), ' + IntToStr(GRIDMAXDATA) + '), '; + ngMSSQL: Select := Select + ' LEFT(CAST(' + DBObj.Connection.QuoteIdent(c.Name) + ' AS NVARCHAR('+IntToStr(GRIDMAXDATA)+')), ' + IntToStr(GRIDMAXDATA) + '), '; ngMySQL: Select := Select + ' LEFT(' + DBObj.Connection.QuoteIdent(c.Name) + ', ' + IntToStr(GRIDMAXDATA) + '), '; end; end else