Compartilhar via


Determine how many records are in a DataSet

To determine how many records are in a dataset, you can use the Count method of the Rows in a table (last line in code).

        // New DataSet

        DataSet dbSet = new DataSet();

 

        // Populate DataSet with data

        dbAdapt.Fill(dbSet, "issueReport");

 

        // Determine how many records we have

        labelRecordCount.Text = dbSet.Tables["issueReport"].Rows.Count.ToString();