counting records

  • Thread starter Thread starter Brad
  • Start date Start date
B

Brad

Probably an easy question, but how do I count the number of records in a
dataset when there are no bindings. I was using
me.bindingcontext(dsName1).count, but it is always returning 1 when I know
for a fact that the test data has three records. I am using
dsName1.tables(0).newrow to add the new row; the user sets the information
and then saves this row back to the dataset and then the data adapter is
updated.

What I want to do on form load is to return the number of records currently
in the dataset.

Thanks for the information.

Brad
 
A dataset can have many tables in it so it is not right to ask how many
records are in my dataset.

It is better to ask: How many records are in this datatable in my dataset?

ds.Tables("dtSomeTable").Rows.Count
 
Back
Top