Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 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 November 23rd, 2007, 09:58 AM
Registered User
Join Date: Nov 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Dataset repeated values

I have a dataset MyDs which has a table MyTable. In MyTable I have column Quantity and column
ProductId. What I need to do is iterate through the dataset an check which product ids are repeated and total up the corresponding quantities. I don't know how to check for repeated products id...
I've been stucked for more than a day trying to do this plz help me.



Old November 23rd, 2007, 10:31 AM
joefawcett's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts

You have two basic options. The easiest is to have the database return the data alongside the initial data. You then get two datatables, one for individual data and one for aggregates. If you need something more dynamic on the client then you need to create a secondary table and set the expression property of the columns to point at the first tables rows.

See these links:


Joe (Microsoft MVP - XML)

Similar Threads
Thread Thread Starter Forum Replies Last Post
How dowe mention Dataset to use the default values sri_k47 VB Databases Basics 0 March 7th, 2008 05:33 AM
load values into the dataset from the xml dhol General .NET 2 December 31st, 2004 06:37 AM
load values into the dataset from the xml dhol XML 1 December 31st, 2004 05:34 AM
Unique values from a dataset gbuller Pro VB.NET 2002/2003 3 September 27th, 2004 12:17 PM

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