Create fails when script uses SQL Server 2008 Spatial types
Bug #921220 reported by
Adam Connelly
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
DB Version |
Fix Committed
|
Critical
|
Adam Connelly |
Bug Description
The script execution can fail when the script uses the SQL Server 2008 spatial API because it uses "::". dbversion uses NHibernate queries to execute scripts which parse colons as named parameters.
To solve this we can grab the connection from the hibernate session and create a command from it.
Here's some example code that can fail:
CREATE FUNCTION [dbo].[
(
@Latitude float,
@Longitude float,
@RadiusMetres int
)
RETURNS TABLE
AS
RETURN
(
select *
from
(select geography:
*
from GeographicArea) dist
where dist.Distance <= @RadiusMetres
)
Related branches
Changed in dbversion: | |
status: | New → In Progress |
status: | In Progress → Fix Committed |
To post a comment you must log in.