[fdo-trac] #549: SQL Spatial - cannot read 'uniqueidentifier' fields
FDO
trac_fdo at osgeo.org
Thu Aug 20 18:57:17 EDT 2009
#549: SQL Spatial - cannot read 'uniqueidentifier' fields
-----------------------------+----------------------------------------------
Reporter: chriserickson | Owner: gregboone
Type: defect | Status: new
Priority: major | Milestone: 3.5.0
Component: FDO API | Version: 3.4.0
Severity: 1 | Keywords:
External_id: |
-----------------------------+----------------------------------------------
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();
--
Ticket URL: <http://trac.osgeo.org/fdo/ticket/549>
FDO <http://fdo.osgeo.org/>
Feature Data Objects
More information about the fdo-trac
mailing list