Modify C# Dataset


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
Charles BaldoSoftware DeveloperAsked:
Who is Participating?
 
osiris247Commented:
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
 
Charles BaldoSoftware DeveloperAuthor Commented:
Thanks o it works
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.