用C#需要在a.db数据库中的DUODIAN表的geom(MULTIPOINT)字段,插入自己随机生成的点要素,按照网上的方法添加了32位的spatialite空间扩展“libspatialite-4.dll”,已经能实现Seclect语句查询空间字段geom里的值(表里有两条样例数据,现在需要插入测试数据报错,第一次弄,请大家帮帮我,谢谢,代码如下:
```string sql="select load_extension('libspatialite-4.dll')";//引用SQLite的spatiallite扩展
SQLiteCommand comm=new SQLiteCommand();
comm.Connection=conn;
comm.CommandText=sql;
comm.ExecuteNonQuery();
comm.CommandText="insert into table_kongjian (pk,geom) values(1,GeomFromText('MULTIPOINT((2 3),(4 6))',4490))";//插入测试数据报错,
comm.ExecuteNonQuery();
错误提示:
constraint failed
table_kongjian.geom violates Geometry constraint【geom-type or SRID not allowed】