|
-
Feb 26th, 2004, 02:17 PM
#1
Thread Starter
Hyperactive Member
row count in a dataset?
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?
-
Feb 26th, 2004, 06:10 PM
#2
Addicted Member
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.
-
Feb 26th, 2004, 07:02 PM
#3
PowerPoster
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
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
-
May 8th, 2006, 11:14 PM
#4
Lively Member
Re: row count in a dataset?
hi Palm
did u resolve u r query about record count after executing u r query statement.. please let me know
thnks
-
May 10th, 2006, 09:24 AM
#5
Thread Starter
Hyperactive Member
Re: row count in a dataset?
Yes, I did by what taxes suggested. )) Thanks, Deepa.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|