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

Re: counting records by Brad

Brad
Sat Nov 22 21:46:09 CST 2003

Found it....I can use this:
For i = 1 To DsEntryForm1.Tables(0).Rows.Count



"Brad" <applauseprod@hotmail.com> wrote in message
news:eOplnKXsDHA.2252@TK2MSFTNGP09.phx.gbl...

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



Re: counting records by Joe

Joe
Sat Nov 22 22:11:46 CST 2003

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
--
Joe Fallon




"Brad" <applauseprod@hotmail.com> wrote in message
news:eOplnKXsDHA.2252@TK2MSFTNGP09.phx.gbl...
> 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
>
>