Hi,
I just tried to build some logic, where I split a server table with multiple topologies (points + lines + polygons) into three seperate layers, displaying these as layers in a LayerOverlay.
To do this, I add a where clause, selecting only the relevant geometry types for each layer. I use the OGC method STGeometryTYpe() for this, i.e.:
- (layer).WhereClause = "where " + geoColnam + “.STGeometryType() In (‘Point’)”
- (layer).WhereClause = "where " + geoColnam + “.STGeometryType() In (‘LineString’,‘MultiLineString’)”
- (layer).WhereClause = "where " + geoColnam + “.STGeometryType() In (‘Polygon’,‘MultiPolygon’,‘GeometryCollection’)”
I get an error saying that the method “STGeometryType” isn’t found, even though a query with the exact same clause in Management Studio et.al. works perfectly.
Are there limitations to what kind of SQL one can use in the MsSql2008FeatureLayer where clauses ??
Cheers
Lars