[mapguide-users] Selection Limit?
Mauricio Villablanca
mgvillablanca at yahoo.com
Mon Jul 27 17:43:07 EDT 2009
I noticed $selection2->GenerateFilter($layer, $layerClassName) doesn't always
generate a valid filter in MGE2009. Use GenerateFilters instead
Check my post in the "Problem with MgSelection's SelectedFeatures" thread
started by Tom Lazo for selecting features.
Nickthetemp wrote:
>
> Hello
>
> I am using the following code to read through a selection and grab a 7
> digit number, which is then put into an array:
>
> $layerClassName = $layer->GetFeatureClassName();
> $selectionString = $selection2->GenerateFilter($layer,
> $layerClassName);
>
> // Get the feature resource for the selected layer
>
> $layerFeatureId = $layer->GetFeatureSourceId();
> $layerFeatureResource = new
> MgResourceIdentifier($layerFeatureId);
>
> // Apply the filter to the feature resource for the selected
> layer. This returns
> // an MgFeatureReader of all the selected features.
>
> $queryOptions->SetFilter($selectionString);
> $featureReader =
> $featureService->SelectFeatures($layerFeatureResource, $layerClassName,
> $queryOptions);
>
> // Process each item in the MgFeatureReader, displaying the
> PID
>
> while ($featureReader->ReadNext())
> {
> $valArray[$counter] = $featureReader->GetInt32('PID');
> $counter = $counter + 1;
> }
>
> The code works fine until I hit a larger selection number. Is there a
> limit on the number of features that can be selected from a database?
>
> I get the following error when the selection is big:
>
> An exception occurred in FDO component. RDBMS: [IBM][CLI
> Driver][DB2/LINUX] SQL0010N The string constant beginning with ""MAPI"
> does not have an ending string delimiter. SQLSTATE=42603
>
> Any help would be appreciated
>
> Nick
>
--
View this message in context: http://n2.nabble.com/Selection-Limit--tp3321984p3336537.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users
mailing list