Ticket #3722 (closed defect: fixed)
SQL Spatial cannot use UniqueIdentifier field as unique key
| Reported by: | sylvanascent | Owned by: | tamas |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Input - Native MS SQL Server Support | Version: | 5.6 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
MapServer with SQL Spatial does not work with a DATA statement like this in the Map file:
DATA "Feature from MetesAndBoundsHeader? USING UNIQUE PKey USING SRID=4326"
where PKey is defined like this:
[PKey] [uniqueidentifier] DEFAULT NEWSEQUENTIALID() ROWGUIDCOL NOT NULL,
Here is the ODBC trace:
UCHAR * 0x05E1A990 [ -3] "SELECT Feature.STAsBinary(),convert(varchar(20), PKey) from MetesAndBoundsHeader? WHERE Feature.STIntersects(Geometry::STGeomFromText('POLYGON((-104.18599 29.2473266843318,-93.22438 29.2473266843318,-93.22438 41.3707663156682,-104.18599 41.3707663156682,-104.18599 29.2473266843318))',4326)) = 1 \ 0" SDWORD -3
DIAG [42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Insufficient result space to convert uniqueidentifier value to char. (8170)
