Skip to content

Commit f5c6353

Browse files
authored
Merge pull request #113 from BlueSpatial/master
Fix for saving/loading large geometries using MsSql
2 parents 2baea32 + f4d2227 commit f5c6353

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

NHibernate.Spatial.MsSql/Type/MsSqlGeometryType.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ public CustomGeometryType()
6363
public override void Set(DbCommand cmd, object value, int index, ISessionImplementor session)
6464
{
6565
var parameter = (SqlParameter) cmd.Parameters[index];
66-
parameter.SqlDbType = SqlDbType.Binary;
66+
parameter.SqlDbType = SqlDbType.VarBinary;
67+
parameter.Size = ((byte[])value).Length;
6768
parameter.Value = value;
6869
}
6970

NHibernate.Spatial.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<VersionMinor Condition="'$(VersionMinor)' == ''">2</VersionMinor>
77
<VersionPatch Condition="'$(VersionPatch)' == ''">1</VersionPatch>
88
<!-- NOTE: Set to "preXYZ" for pre-releases and leave blank for full releases -->
9-
<VersionSuffix Condition="'$(VersionSuffix)' == ''">pre001</VersionSuffix>
9+
<VersionSuffix Condition="'$(VersionSuffix)' == ''">pre002</VersionSuffix>
1010

1111
<!-- NOTE: Generally shouldn't need to edit anything below this line -->
1212
<VersionPrefix>$(VersionMajor).$(VersionMinor).$(VersionPatch)</VersionPrefix>

0 commit comments

Comments
 (0)