我正在创建:
public DataTable CreateEmptyTableGeometryPoint(int srid)
{
DataTable dt = new DataTable();
SqlDataAdapter adapter = new SqlDataAdapter(
string.Format("SELECT * FROM Geometry_Point_SRID_{0}",srid),
connection);
adapter.MissingSchemaAction = MissingSchemaAction.AddWithKey;
adapter.FillSchema(dt, SchemaType.Source);
return dt;
}
现在,我尝试了:
DataTable dtGeometry = dal.CreateEmptyTableGeometryPoint(srid);
DataRow rowGeometry = dtGeometry.NewRow();
rowGeometry["Geometry"] = SqlGeometry.Point(100.0, 300.0, srid);
我得到一个ArgumentException
.
为什么我会得到这个异常?有人能帮我吗?