Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.1
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 16th, 2004, 08:06 AM
Registered User
 
Join Date: Sep 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Count of Number of Rows in DataSet or DataReader

i am willing to use either and realize that a DataReader is forward-only; however, I'd like to place each row from a query into an array after running the query and getting a DataReader/DataSet. This is from an Access database. Any ideas?

 
Old September 16th, 2004, 08:14 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

What are you trying to do with the data?

 
Old September 16th, 2004, 08:38 AM
Registered User
 
Join Date: Sep 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I want to put each value into an array, and then pull the integer value from one field out in each row and add it to the next (i.e., I want to create a total for that field based on the rows pulled) Like so:

Table Invoices

Transaction Date OrderID Client ID Transaction Price
1234 9/9/2004 1 2 148
4567 9/10/2004 2 2 129
7890 9/12/2004 3 2 118


I want the total, 395, returned to me.

 
Old September 16th, 2004, 09:00 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

for a row count you need to count rows on a table in the dataset

dim intRC AS Integer
intRC = ds<Name>.Tables(0).Rows.Count






Similar Threads
Thread Thread Starter Forum Replies Last Post
DataReader/DataSet mike_remember ASP.NET 1.0 and 1.1 Professional 10 April 10th, 2007 04:05 PM
Which is better Datareader or Dataset. akhilhp ASP.NET 2.0 Basics 4 April 10th, 2007 04:43 AM
DataReader brings back No data for Rows/Columns testsubject ADO.NET 13 January 16th, 2006 05:37 PM
count of rows ashokparchuri ADO.NET 3 April 19th, 2005 11:19 AM
count the number of rows in the table crmpicco Javascript How-To 4 February 2nd, 2005 12:58 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.