how can i retrieve the record count

  • 13 years ago


     I am using sqlclient data reader of ADO.NET to fetch the records. In this thru which property/method I can retrieve the record count?

    Thanks & Regards

  • 13 years ago

    I hope this helps but this is what I use (altho I use access):


    Me.lblNavLocation.Text = (((Me.BindingContext(objNewCustomer, "Customers").Position + 1).ToString + " of  ") _
                       + Me.BindingContext(objNewCustomer, "Customers").Count.ToString)

    I create a label named lblNavLocation and link it to the dataset

Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“C++: an octopus made by nailing extra legs onto a dog.” - Steve Taylor