Fixed
Details
Details
Assignee
Ricardo Stuven
Ricardo StuvenReporter
Peter Davis
Peter DavisComponents
Fix versions
Affects versions
Priority
Who's Looking?
Open Who's Looking?
Created December 2, 2008 at 9:21 PM
Updated March 8, 2009 at 9:29 PM
Resolved March 8, 2009 at 9:29 PM
When the mapped geometry property of an object that is being saved is null, the following SQL is being generated by the SQLServer 2008 Spatial dialect:
exec sp_executesql N'INSERT INTO SpatialTable (theGeometryCol) VALUES (@p0)', N'@p0 tinyint', @p0=NULL
when it should be
exec sp_executesql N'INSERT INTO SpatialTable (theGeometryCol) VALUES (@p0)', N'@p0 geometry, @p0=NULL
The resulting error is: "Operand type clash: tinyint is incompatible with geometry"
Example table for this sample is:
CREATE TABLE SpatialTable(
id int IDENTITY (1,1),
theGeometryCol geometry)
GO