Ticket #3722 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

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)

Change History

Changed 2 years ago by tamas

  • owner changed from hobu to tamas

Changed 2 years ago by tamas

  • status changed from new to closed
  • version changed from unspecified to 5.6
  • resolution set to fixed

Fixed the problem in trunk (r11145) and branch-5-6 (r11146)

Note: See TracTickets for help on using tickets.