Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_beginners thread: row count for dataSet or dataTable


Message #1 by Cindy.Somerville@h... on Tue, 22 Oct 2002 19:32:48
This is this problem that I'm working on:
I want to loop through my dataTable and test the date field for a match to 
another date variable. 

How do I get a row count for either the DataTable or DataSet so that I can 
use a for loop?

Or is there a better way to do this? I'm coding in C#

Thanks
Message #2 by Elissa Setarehshenas <elissasetareh@y...> on Tue, 22 Oct 2002 12:09:20 -0700 (PDT)
Cindy,
Try
myDataSet.Tables["TableName"].Rows.Count
Elissa
--- Cindy.Somerville@h... wrote:
> This is this problem that I'm working on:
> I want to loop through my dataTable and test the
> date field for a match to 
> another date variable. 
> 
> How do I get a row count for either the DataTable or
> DataSet so that I can 
> use a for loop?
> 
> Or is there a better way to do this? I'm coding in
> C#
> 
> Thanks
> ---
> Beginning ASP.NET Databases using VB.NET
> http://www.wrox.com/ACON11.asp?ISBN=1861006195
> 
> Beginning ASP.NET Databases using C#
> http://www.wrox.com/ACON11.asp?ISBN=1861007418
> 
> These books look at how we can create data-centric
> ASP.NET 
> applications. Requiring some basic knowledge of
> ASP.NET, 
> Access and SQL the authors guide you through the
> process 
> of connecting and consuming information in a variety
> of 
> ways. They are packed full of excellent illustrative
> code 
> examples, demonstrating important fundamental
> principles.


__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/

  Return to Index