Connecting Tech Pros Worldwide Help | Site Map

C# datasets

Newbie
 
Join Date: Oct 2009
Posts: 1
#1: Oct 1 '09
Here is my issue I have a dataset (ds1) . I have cloned the dataset to create (ds2) and now I need to iterate through (ds1) row by row and compare each row to the previous. before inserting a new row into (ds2). I need to identify if the "category" field of the first row is duplicated in the second row, if so, If so, I want to insert a NULL value for "category" into (ds2) for the 2nd row and so on. Also, I need to compare a field called "ReportTypeID" if this is the same as the previous record I need to and this is the "REALLY" tricky part, append the value of that rows "CommonTextID" to the value of the previous rows "CommonTextID" field before inserting into (ds2) If you can provide me with any help I would greatly appreciate it.

EX of dataset
ReportTypeID, ReportTypeName,CommonTextID,CommonTextName,Categor y

1 Fact 51 M-Foot FOOT
3 MPR 33 Global FOOT
3 MPR 36 MPR FOOT

Regards, JS
tlhintoq's Avatar
Moderator
 
Join Date: Mar 2008
Location: Arizona, USA
Posts: 1,743
#2: Oct 1 '09

re: C# datasets


Sounds like you have really thought out your needs.

If you could provide the code you've written and the error message it is producing, or in some way describe the problem you're having with your code someone here should be able to help.
tlhintoq's Avatar
Moderator
 
Join Date: Mar 2008
Location: Arizona, USA
Posts: 1,743
#3: Oct 1 '09

re: C# datasets


By the way - in the future please don't post the same question to multiple topics. There was no reason for this to have been copy/pasted into both C-sharp and to .NET topics.

That just causes some answers in one place, and some in another and no cohesive effort to solve your issue.
Reply

Tags
datasets