[mapguide-users] MapGuide SQL2008 Provider: can't support geometry method?

Carl carlshe at 163.com
Sun Oct 19 09:40:42 EDT 2008


I tried 'ExecuteSqlQuery' of 'Feature' on
http://localhost/mapguide/mapagent/index.html.

such as: 
select [Prj_Name] from CArchive_Archive_FolderGroup_Project where
Prj_Geometry.STIsClosed()=1

it can work.

and I tried 'SelectFeatures' of 'Feature', filled the Resource id,Class
name, and Filter with 'Prj_Geometry.STIsClosed()=1'. and then click
'submit', it fails.

The returned message is as follows:

An exception occurred in FDO component. RDBMS: [Microsoft][ODBC SQL Server
Driver][SQL Server]'STIsClosed' is not the intrinsic function. Exception
occurred in method MgServerSelectFeatures.SelectFeatures at line 249 in file
d:\buildforgeprojects\mapguide_open_source_v2.0\build_23.8\mgdev\server\src\services\feature\ServerSelectFeatures.cpp
.

It seems the problem of FDO. If Filter doesn't accept the geometry method,
How to set a spatial filter for a layer?


Carl wrote:
> 
> I just had a post about SQL 2008 Provider and got many effective answers,
> and had my problem partially resolved.
> 
> Now I can add a layer referencing to a feature datasource of ms sql 2008. 
> 
> Further more, I need to give a filter to the layer to select part of
> features. if I give a common condition(i.e. the common boolean clause,
> such as " id='1' and name like '%_c' "), and the mapguide can give a
> correct response (i.e. the features on the map are just those selected).
> but if I give a spatial condition ( such as "Prj_Geometry.STIsClosed()=1
> "), Mapguide always return a map contains all features.
> 
> Is the boolean expression parsed by the datasource or by MapGuide Server
> itself? 
> 
> In my opinion, the filter string should be parsed and executed by the
> provider datasource, such as MS SQL server 2008.
> 
> could anybody help me?
> 

-- 
View this message in context: http://www.nabble.com/MapGuide-SQL2008-Provider%3A-can%27t-support-geometry-method--tp20056020p20056214.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list