[mapguide-users] SelectFeatures and string ID fields

Warren Medernach wmedernach at rand.com
Wed Nov 25 18:22:32 EST 2009


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

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20091125/c7457e09/attachment.html


More information about the mapguide-users mailing list