?
Solved

Modify C# Dataset

Posted on 2006-04-10
2
Medium Priority
?
967 Views
Last Modified: 2009-01-26

I have a dataset that was populated from the database. I want to modify the second column of every row. Its a multiple tier system and I can not modify it with the sql. I need to modify the dataset. Could someone either give me a quick code snippet or point me to an online source or tutorial where this is done? The data types of all the columns are string.

Best
Chuck
0
Comment
Question by:Charles Baldo
2 Comments
 
LVL 7

Accepted Solution

by:
osiris247 earned 2000 total points
ID: 16420432
foreach (DataRow row in dataset.table["tablename"].rows)
{
dataset.table["tablename"].Rows[1][row] = "some value"; //where 1 is the 2nd column
}

hope this helps.

o
0
 

Author Comment

by:Charles Baldo
ID: 16420570
Thanks o it works
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Integration Management Part 2
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question