Get number of rows in File Geodatabase.

2220
1
09-22-2013 08:56 PM
kishoremudapaka
New Contributor
Is there any way to get number of records in a table? As of now, we are using following lines of code, which takes huge time to run.

EnumRows m_AllRows;
..
..
int numOfRows=0;
while(m_AllRows->Next(NewRow)==S_OK)
{
      numOfRows++;
}

I am expecting something like m_AllRows->GetNumberOfRows(numOfRows), which gives number of rows in a EnumRows object.

Thank you!
0 Kudos
1 Reply
LanceShipman
Esri Regular Contributor
Currently the only way to do this is:

EnumRows m_AllRows;
..
..
int numOfRows=0;
while(m_AllRows->Next(NewRow)==S_OK)
{
numOfRows++;
}


In the next release you will be able to use SELECT COUNT(*) FROM Table to return the number of rows. We expect to have the next release available before the 2014 Dev Summit. Possibly earlier.
0 Kudos