[fdo-trac] #349: ODBC provider incorrectly read SQL Server views
FDO
trac_fdo at osgeo.org
Fri Jun 13 11:31:14 EDT 2008
#349: ODBC provider incorrectly read SQL Server views
-----------------------------+----------------------------------------------
Reporter: pierrega | Owner: gregboone
Type: defect | Status: new
Priority: blocker | Milestone:
Component: ODBC Provider | Version: 3.2.0
Severity: 3 | Keywords: odbc sql server view
External_id: |
-----------------------------+----------------------------------------------
Environment:
SQL Server 2005
MapGuide Studio 2009
Main Table SQL:
{{{
CREATE TABLE [dbo].[Tab_XY](
[ID] [smallint] NOT NULL,
[X] [float] NOT NULL,
[Y] [float] NOT NULL,
[Test] [float] NOT NULL,
[Z] [float] NOT NULL,
CONSTRAINT [PK_Tab_XY] PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY =
OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
}}}
View SQL:
{{{
CREATE VIEW [dbo].[New_View]
AS
SELECT ID AS vID, X AS vX, Y AS vY, Test AS vTest, Z AS vZ
FROM dbo.Tab_XY
}}}
When I click "Show tables" in studio, what I get looks like:
{{{
[Table] [Key Fields]
Tab_XY ID
New_View vID, vX, vY, vTest, vZ
}}}
So, I can't select my vX and vY columns as X and Y for geometry.
I found a way to workaround this problem by using the mapagent and editing
the xml but this is a bit annoying for myself and I can imagine how it can
be for my customer.
Note that I tested that if the X, Y and Z columns are nullable, the
provider does not choose them as keys in New_View but my customer can’t
(or don’t want to) change the structure of his tables.
Regards,[[BR]]
Pierre
--
Ticket URL: <http://trac.osgeo.org/fdo/ticket/349>
FDO <http://fdo.osgeo.org/>
Feature Data Objects
More information about the fdo-trac
mailing list