ok so i have "Microsoft.Data.Odbc" but how do u get a row count??

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

using the Microsoft.Data.Odbc component instead of System.Data.Odbc

how do u get a row count using the Microsoft.Data.Odbc.OdbcDataReader ??

and is it best to use Microsoft.Data.Odbc OR System.Data.Odbc?

thank you in advance..
 
matt,

You should be using the classes from System.Data.Odbc, as those are more
up to date.

To get a row count, you will have to select all the rows into a data
set, and then count the rows (using the count property), or you can just do
a "select count(*) from table" and get the result (using a OdbcCommand or
selecting into a DataSet using an OdbcDataAdapter).

Hope this helps.
 
Back
Top