[Fdo-trac] [fdo-trac] #862: Do not query table-valued inline functions in SpatialContextReader
FDO
trac_fdo at osgeo.org
Wed Feb 27 02:35:37 PST 2013
#862: Do not query table-valued inline functions in SpatialContextReader
---------------------------------+------------------------------------------
Reporter: gBecker | Owner: danstoica
Type: defect | Status: new
Priority: major | Milestone: 3.8.0
Component: SQLServer Spatial | Version: 3.7.0
Severity: 3 | Keywords:
External_id: |
---------------------------------+------------------------------------------
If you have table-valued functions in your SQL Server Database that
returns a table with spatial columns then you get an error when trying to
determine the extent of the data. The following error is listed in
MapGuide error.log:
Error: An exception occurred in FDO component.
Error occurred in Feature Source
(Session:05eea926-80b9-11e2-8000-002264a7285f_en_MTI3LjAuMC4x0AFC0AFB0AFA
//3c1658ff-82a7-44a9-9005-3f262b0cb02d.FeatureSource): RDBMS:
[Microsoft][SQL Server Native Client 10.0][SQL Server]Parameters were not
supplied for the function
'FFM_Fes.cdc.fn_cdc_get_all_changes_dbo_fes_AlteGeometrien'.
Since table-valued functions are supposable not supported in SQL Server
Provider for FDO, the solution could be to just query SQL Server objects
that are not of type 'function'. I think the SQL to query the extent of
the spatial data is in this
file:[http://trac.osgeo.org/fdo/browser/trunk/Providers/GenericRdbms/Src/SQLServerSpatial/SchemaMgr/Ph/Rd/SpatialContextReader.cpp]
Changing the WHERE-clause to
{{{
where ((f.name in ( 'geometry','geography' ) or e.object_id is not null)
AND a.type <> 'if')
}}}
should solve the problem, I think.
Maybe there are other places to change!
--
Ticket URL: <http://trac.osgeo.org/fdo/ticket/862>
FDO <http://fdo.osgeo.org/>
Feature Data Objects
More information about the fdo-trac
mailing list