What is CrazyEngico.com (CE)?

CrazyEngico (CE) is a one-stop solution for interview questions and answers, domain knowledge, e-learning, tutorials, articles and many more learning material.
e-learning - Intelligent e-learning tutorials and articles
Domain Knowledge Learn about various business domains/verticals such as Banking, Financial, Insurance, Healthcare and many more...
Interview Questions and Answers - Post your questions and answers. 1000+ database of ready questions and answers available to prepare for an interview.
Tutorials - 300+ video tutorials from beginner to expert level.
Articles - 300+ technical articles to understand concepts.
Forum - A technical forum to post your queries/responses.

Search Questions

Interview Questions/Answers

Interview Q & A >> ADO.NET >> How to find the count of records in a dataset?

<< Previous Question Navigator Next >>

0        0
How to find the count of records in a dataset? (Views: 1657)


1        0
If we have DataSet (dsExample) with only 1 table:

We will find the count using:

dsExample.Tables[0].Rows.Count; //in C#

dsExample.Tables(0).Rows.Count 'VB

Submitted By: Sam | Created On: 7/25/2009 7:09:50 PM

0        3

foreach(DataTable thisTable in myDataSet.Tables)
//For Each row, print the values of each column.
foreach(DataRow myRow in thisTable.Rows)

Submitted By: Anonymous | Created On: 5/16/2009 4:22:02 PM

Post your Answer
Your answer will be first reviewed by our administrator before it appears on the site.

Your Answer:

Display Name:

By clicking on Submit button you agree to the Terms of Service agreement.

Copyright © 2018 CrazyEngico.com. All rights reserved.
CrazyEngico.com is not responsible for the content and CrazyEngico.com does not evaluate or guarantee the accuracy of any CrazyEngico.com content.
Please read our terms of service agreement before using this site.