Opened 15 years ago
Closed 14 years ago
#549 closed defect (duplicate)
SQL Spatial - cannot read 'uniqueidentifier' fields
Reported by: | chriserickson | Owned by: | brentrobinson |
---|---|---|---|
Priority: | major | Milestone: | 3.5.0 |
Component: | FDO API | Version: | 3.5.0 |
Severity: | 1 | Keywords: | |
Cc: | External ID: |
Description
With a SQL table that has a PK of ID UNIQUEIDENTIFIER (guid) it loads just fine, mapping the data type to be string(36). However, when you try and select data, you get an error:
OSGeo.FDO.Common.Exception: RDBMS: Incompatible column type ---> OSGeo.FDO.Common.Exception: RDBMS: Incompatible column type
The table itself has no data in it. Here is the script to create the table, as well as the code I'm using to select: CREATE TABLE [SqlCreated].[Geography](
[ID] [uniqueidentifier] NULL, [Shape] [geography] NULL, [Description] [varchar](255) NULL
) ON [PRIMARY]
Sample code:
ISelect command = (ISelect)_database._connection.CreateCommand(CommandType.CommandType_Select); command.SetFeatureClassName(_class.QualifiedName); command.PropertyNames.Add(new Identifier("ID")); command.Prepare();
IFeatureReader dataReader = command.Execute();
Change History (2)
comment:1 by , 14 years ago
Owner: | changed from | to
---|
comment:2 by , 14 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Version: | 3.4.0 → 3.5.0 |
Duplicate of #484