diff --git a/src/Runtime/XSharp.SQLRdd/DBMS/SqlServer.prg b/src/Runtime/XSharp.SQLRdd/DBMS/SqlServer.prg
index 8bd4a21b87..6128627657 100644
--- a/src/Runtime/XSharp.SQLRdd/DBMS/SqlServer.prg
+++ b/src/Runtime/XSharp.SQLRdd/DBMS/SqlServer.prg
@@ -111,6 +111,7 @@ class SqlDbProviderSqlServer inherit SqlDbProvider
{"ASC(%1%)" ,"ASCII(%1%)"},;
{"TRIM(%1%)" ,"RTRIM(%1%)"},;
{"ALLTRIM(%1%)" ,"TRIM(%1%)"},;
+ {"LENGTH(%1%)" ,"LEN(%1%)"},;
{"+" ,"+"}}
endif
end lock
diff --git a/src/Runtime/XSharp.SQLRdd/RDD/SQLRDD-Private.prg b/src/Runtime/XSharp.SQLRdd/RDD/SQLRDD-Private.prg
index d3cc53a19b..4e24ce968f 100644
--- a/src/Runtime/XSharp.SQLRdd/RDD/SQLRDD-Private.prg
+++ b/src/Runtime/XSharp.SQLRdd/RDD/SQLRDD-Private.prg
@@ -196,7 +196,7 @@ partial class SQLRDD
local dbColumn := self:_Fields[index] as RddFieldInfo
// use the BlankValue() from the RddFieldInfo class. One place to define blanks is enough
var blank := dbColumn:BlankValue()
- if blank is string var strBlank
+ if blank is string var strBlank .and. !_oTd:TrimTrailingSpaces
blank := strBlank:PadRight(dbColumn:Length, ' ')
endif
self:_phantomRow[index] := blank
diff --git a/src/Runtime/XSharp.SQLRdd/XSharp.SQLRDD.xsproj b/src/Runtime/XSharp.SQLRdd/XSharp.SQLRDD.xsproj
index 63a9fa9473..d745b3c5b5 100644
--- a/src/Runtime/XSharp.SQLRdd/XSharp.SQLRDD.xsproj
+++ b/src/Runtime/XSharp.SQLRdd/XSharp.SQLRDD.xsproj
@@ -103,7 +103,7 @@
-
+
MacroCompiler (Macrocompiler\MacroCompiler)
{eb3f3142-07f7-48ca-b38d-f611c45a9511}
True
diff --git a/src/SqlRdd.slnx b/src/SqlRdd.slnx
index b380fb16d0..19a4552d5b 100644
--- a/src/SqlRdd.slnx
+++ b/src/SqlRdd.slnx
@@ -1,7 +1,5 @@
-
-
@@ -39,8 +37,6 @@
-
-
@@ -49,14 +45,13 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
-
+
diff --git a/src/Tests/SqlDataexpl/SqlRddDataexpl.xsproj b/src/Tests/SqlDataexpl/SqlRddDataexpl.xsproj
index f2aa62ab9f..60fe0d8f32 100644
--- a/src/Tests/SqlDataexpl/SqlRddDataexpl.xsproj
+++ b/src/Tests/SqlDataexpl/SqlRddDataexpl.xsproj
@@ -179,7 +179,7 @@
-
+
MacroCompiler (Macrocompiler\MacroCompiler)
{eb3f3142-07f7-48ca-b38d-f611c45a9511}
True
diff --git a/src/Tests/SqlRDDTests/SQLRddTests.xsproj b/src/Tests/SqlRDDTests/SQLRddTests.xsproj
index 507671eb35..a5fefcbdfd 100644
--- a/src/Tests/SqlRDDTests/SQLRddTests.xsproj
+++ b/src/Tests/SqlRDDTests/SQLRddTests.xsproj
@@ -101,7 +101,7 @@
-
+
MacroCompiler (Macrocompiler\MacroCompiler)
{eb3f3142-07f7-48ca-b38d-f611c45a9511}
True