I am new to vb.net.
Now I am tring to query a set of related tables to get a record set, how can I get the record count in the result?
Printable View
I am new to vb.net.
Now I am tring to query a set of related tables to get a record set, how can I get the record count in the result?
If you want to know the number of rows in a dataset
VB Code:
Dim currentTable As DataTable Dim count As Integer = 0 For Each currentTable in myDataSet count += currentTable.Rows.Count Next 'count is the total number of rows in the dataset.
Hi,
There is an easier way to use when you fill the dataset. Assuming the data adapter is da1; the data set is ds1 and the field "Name1"
VB Code:
Dim iCount as integer iCount=da1.fill(ds1, "Name1")
iCount will then contain the number of records in ds1
hi Palm
did u resolve u r query about record count after executing u r query statement.. please let me know
thnks
Yes, I did by what taxes suggested. :))) Thanks, Deepa.