SQL SERVER 2008 多边形问题的解决

时间:2015-09-29 01:10:01   收藏:0   阅读:2315

报错内容:

在执行用户定义例程或聚合 "geometry" 期间出现 .NET Framework 错误:
System.ArgumentException: 24144: 由于该实例无效,无法完成此操作。请使用 MakeValid 将该实例转换为有效实例。请注意,MakeValid 可能导致几何图形实例的点轻微移动。
System.ArgumentException:
在 Microsoft.SqlServer.Types.SqlGeometry.ThrowIfInvalid()
在 Microsoft.SqlServer.Types.SqlGeometry.STIntersects(SqlGeometry other)

参考:
http://www.itpub.net/thread-1826669-1-1.html
?
解决办法如下?
@geodata=@geodata.MakeValid()

在字段取值时加上.MakeValid()方法

原文:http://www.cnblogs.com/luodengxiong/p/4845371.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!