Opened 12 years ago
Closed 12 years ago
#862 closed defect (fixed)
Do not query table-valued inline functions in SpatialContextReader
Reported by: | gBecker | Owned by: | jng |
---|---|---|---|
Priority: | major | Milestone: | 3.8.0 |
Component: | SQLServer Spatial | Version: | 3.7.0 |
Severity: | 3 | Keywords: | |
Cc: | External ID: |
Description
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!
Attachments (2)
Change History (7)
by , 12 years ago
Attachment: | TableValuedFunction.sql added |
---|
by , 12 years ago
comment:1 by , 12 years ago
Patched 3.8 provider (64-bit) here: http://download.osgeo.org/mapguide/patches/fdo3.8_ticket862/SQLServerSpatialProvider_3.8_x64.zip
comment:2 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Everything is working now as expected! Thanks.
comment:3 by , 12 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Re-opening because patch has not been reviewed/committed yet.
comment:4 by , 12 years ago
Owner: | changed from | to
---|---|
Status: | reopened → new |
comment:5 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Minimal example