[mapguide-users] SelectFeatures and string ID fields

Jackie Ng jumpinjackie at gmail.com
Tue Dec 8 22:08:06 EST 2009


Have you tried those filters with the same SDF file in FDO Toolbox? 

Filters in FDO are identical to filters in MapGuide. So you can use FDO
Toolbox to test whether your filters produce the expected number of results.

- Jackie


Warren Medernach-2 wrote:
> 
> Are there known problems using a string field as the key field in an SDF
> file?
> 
>  
> 
> I'm trying to zoom to a filtered object, and it seems to work on an SDF
> with a default integer FeatId key field, but fails when I try it on an
> SDF with a string key field.  The FeatureReader is always empty when I
> try to get
> 
>  
> 
> Scenario #1 Works with an SDF with FeatId integer key
> 
> queryOptions.SetFilter("FeatId = 410");
> 
> MgResourceIdentifier featureResId = new
> MgResourceIdentifier(layer.GetFeatureSourceId());
> 
> MgFeatureReader featureReader =
> featureService.SelectFeatures(featureResId, layer.GetFeatureClassName(),
> queryOptions);
> 
>  
> 
> Scenario #2 Fails with an SDF with a string key
> 
> queryOptions.SetFilter("ParcelID = '0102000'");
> 
> MgResourceIdentifier featureResId = new
> MgResourceIdentifier(layer.GetFeatureSourceId());
> 
> MgFeatureReader featureReader =
> featureService.SelectFeatures(featureResId, layer.GetFeatureClassName(),
> queryOptions);
> 
>  
> 
> Any ideas greatly appreciated
> 
> Warren M
> 
>  
> 
> 
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> 
> 

-- 
View this message in context: http://n2.nabble.com/SelectFeatures-and-string-ID-fields-tp4068397p4137142.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list