Datatable containing SqlGeometry is causing stored procedure execution to fail… Why?
I'm trying to save a series of SqlGeometry values to a SQL Server 2008 database. Basically I have a tabletype in a SQL Server stored procedure which looks like this: CREATE TYPE [dbo].[TableType_Example] AS TABLE ( [SpatialID] [bigint] NOT NULL, [RecordID] [bigint] NOT NULL, [geom] [geometry] NOT NULL ) I then build a datatable in C# and send it like this: public static bool SaveSpatialDataElements(long recordID, List<BOSpatial> featureList) { //Setup features datatable DataTable dtFeatures = new DataTable(); dtFeatures.Columns.Add("SpatialID", typeof(SqlInt64)); dtFeatures.Columns.Add(