[mapguide-users] Problems with MgReader::Close()

George McLean gmclean at gorge.net
Sat Oct 13 13:48:21 EDT 2007


I am using PHP with Apache and MGOS 1.2

I am opening and closing a MgFeatureReader where the feature source is 
an SDF layer. This is in a while loop where I am searching for existing 
elements as follows:

$traceReader = $featureService->SelectFeatures($featureResourceId, 
$layerName, $queryOptions);
if ($traceReader->ReadNext())
{
    // call a routine to draw a line
}
$traceReader->Close();

It appears to work on my development server but not on another server. 
Both machines are windows XP SP2 and have MGOS 1.2 installed. I compared 
the serverconfig.ini files on the two machines and they are the same. I 
am pretty sure the routine inside the if brackets is working since it 
does not fail on small loops only larger loops (more that 13 iterations).

Is there any way to check a MgReader is really closed? Is there some way 
to delete the reader object to be sure it is closed?

Thanks for any suggestions

George McLean


More information about the mapguide-users mailing list