Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 0d4d9ea

Browse files
committed
Update String param size to use 4000 max for Unicode
1 parent f78fb70 commit 0d4d9ea

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ServiceStack.OrmLite/Converters/StringConverter.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ public override void InitDbParam(IDbDataParameter p, Type fieldType)
4242

4343
if (p.Size == default)
4444
{
45-
p.Size = StringLength;
45+
p.Size = UseUnicode
46+
? Math.Min(StringLength, 4000)
47+
: StringLength;
4648
}
4749
}
4850

0 commit comments

Comments
 (0)