My SQL 插入空间数据报错:Cannot get geometry object from data you send to the GEOMETRY field

My SQL 插入空间数据报错:Cannot get geometry object from data you send to the GEOMETRY field

发生该问题,百度,谷歌后发现各种解决方法类似,但都不能解决此问题,千辛万苦之后找到解决方法:

https://dev.mysql.com/doc/connector-net/en/connector-net-entityframework50.html

 

方法一:使用MySqlGeometry()这种方式,暂未找到添加面的方法

技术分享

测试代码,插入点数据正常。

方法二使用GeoFromText数据库函数:

技术分享

使用GeoFromText数据库函数,该方法需要在参数外,开始使用GeoFromText(par.Value),一直报标题中的错误 ,使用GeoFromText(Pram)正常

文章来自:http://www.cnblogs.com/hl137510705/p/7060101.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3