[fdo-internals] Counting rows in managed IFeatureReader

Robert Fortin robert.fortin at autodesk.com
Wed Apr 16 13:47:51 EDT 2008


You can use the IselectAggregate command with the COUNT function to retrieve the number of rows for a given class.
This will ensure that you use the optimize implementation of the native data source to retrieve the number of row where it is available.

Robert Fortin

-----Original Message-----
From: fdo-internals-bounces at lists.osgeo.org [mailto:fdo-internals-bounces at lists.osgeo.org] On Behalf Of Maksim Sestic
Sent: Wednesday, April 16, 2008 6:11 AM
To: fdo-internals at lists.osgeo.org
Subject: [fdo-internals] Counting rows in managed IFeatureReader

Hi all,

Since IFeatureReader doesn't provide Count property for total number of
records in it, what's the most "proper" way to get it out from managed
IFeatureReader? I'm asking this because of necessity to explicitly close a
reder after it's returned from, say, ISelect command. How do I get a safe
copy of instantiated managed IFeatureReader object to count it's properties,
without affecting the original one?

It would be a no brainer if IFeatureReader was fully implemented in .NET,
but managed bindings always make me wonder if unmanaged resources get
disposed in a proper way.

Maksim Sestic
View this message in context: http://www.nabble.com/Counting-rows-in-managed-IFeatureReader-tp16720338s18162p16720338.html
Sent from the fdo-internals mailing list archive at Nabble.com.

fdo-internals mailing list
fdo-internals at lists.osgeo.org

More information about the fdo-internals mailing list