Re: Counting records in a dataset
- From: "Siva M" <shiva_sm@xxxxxxxxxxxxxxxxx>
- Date: Mon, 18 Jul 2005 20:20:50 +0530
Datasets don't contain any records. It's the datatables inside the datasets
that contain records. So, if you want to know the number of records in the
first datatable, use DataSet.Tables[0].Rows.Count property (after filling
the dataset).
HTH.
"Jim Campau" <jim_campau@xxxxxxxxxx> wrote in message
news:eJ4Ko25iFHA.1372@xxxxxxxxxxxxxxxxxxxxxxx
I am trying to count the number of records in a dataset (ChangeOverDataset1)
and have the results post to a textbox (txtResult). I have tried a few
different way to get this to work but I don't know how. I am a newbie.
Please help.
Thanks in Advance,
========================================
ChangeOverDataSet1.Clear()
OdbcDataAdapter1.Fill(ChangeOverDataSet1)
Dim Command As Odbc.OdbcCommand = New Odbc.OdbcCommand("SELECT COUNT(*) FROM
ChangeOverDataSet1", OdbcConnection1)
txtResult = Command
.
- References:
- Counting records in a dataset
- From: Jim Campau
- Counting records in a dataset
- Prev by Date: RE: VS Help not working.
- Next by Date: response.addheader
- Previous by thread: Counting records in a dataset
- Next by thread: VS Help not working.
- Index(es):
Relevant Pages
|
|