Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

modified my patch, added a check against the length. if the lenght is…

… greater than 4000 then it is assumed we are using a ntext or nvarchar(max)
  • Loading branch information...
commit 80e518d41123065df9a891d17e4da146634f1704 1 parent 010568c
@codeimpossible codeimpossible authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 Massive.cs
View
5 Massive.cs
@@ -40,8 +40,11 @@ public static class ObjectExtensions {
p.Value = item;
}
//from DataChomp
+ // jared: added a check for the length here
+ // if the length is greater than 4000 then it is
+ // assumed we are saving a ntext or nvarchar(max)
if (item.GetType() == typeof(string))
- p.Size = 4000 > ((string)item).Length ? 4000 : ((string)item).Length;
+ p.Size = ((string)item).Length > 4000 ? -1 : 4000;
}
cmd.Parameters.Add(p);
}
Please sign in to comment.
Something went wrong with that request. Please try again.