how can i retrieve the record count

  • 16 years ago

    hi


     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
    Anandasa

  • 16 years ago

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


    Code:

    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).

Contribute

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.

“XML is like violence - if it's not working for you, you're not using enough of it.”