Click to See Complete Forum and Search --> : RECORDCOUNT in .NET


ibbly
January 3rd, 2002, 08:47 AM
I'm just starting out with .NET and I had some question about how to get a recordcount in .NET. I am using the SQLDataReader object do get my select query information, and I need to know how many records are in it...I guess I could loop through and get a count, but it doesn't make sense to do that if there is a better way. If anyone can point me in the right direction, I would be most appreciative. Thank you for your time and help!

Doug

maheshbeniwal
January 21st, 2002, 01:44 PM
How do you get SqlDataReader? Using ExecuteReader? ExecuteReader returns number of records affected by the executed query.

http://www.c-sharpcorner.com
C# and .NET Developer's Network