Showing posts with label sqlceresultset. Show all posts
Showing posts with label sqlceresultset. Show all posts

Monday, February 20, 2012

RecordCount in SQL CE?

Does somebody know how to obtain the recordcount from a SqlCeResultSet ?

Thanks in advance!

See this.

|||

Ilya,

Please could you explain your post a little more, since I cannot make it to work.

int rowCount = ((IBindingList)resultSet.ResultSetView).Count;

I'm using VS 2005, Net CF 2.0 SP2 and SQL CE 3.1

thanks in advance!

|||

I’m not quite sure what to explain here, this single line of code is rather primitive. Let me try it: you get ResultSetView from ResultSet, cast it to IBindingList and get Count property which contains number of records.

Are you a VB developer? If so use any free online C# to VB converter to get VB code.

|||

int count = ((System.Collections.ICollection)rs.ResultSetView).Count;

You could try using above line to get the row count of the ResultSet.

RecordCount in SQL CE?

Does somebody know how to obtain the recordcount from a SqlCeResultSet ?

Thanks in advance!

See this.

|||

Ilya,

Please could you explain your post a little more, since I cannot make it to work.

int rowCount = ((IBindingList)resultSet.ResultSetView).Count;

I'm using VS 2005, Net CF 2.0 SP2 and SQL CE 3.1

thanks in advance!

|||

I’m not quite sure what to explain here, this single line of code is rather primitive. Let me try it: you get ResultSetView from ResultSet, cast it to IBindingList and get Count property which contains number of records.

Are you a VB developer? If so use any free online C# to VB converter to get VB code.

|||

int count = ((System.Collections.ICollection)rs.ResultSetView).Count;

You could try using above line to get the row count of the ResultSet.