Advertisement

10.15.2007 at 11:52PM PDT, ID: 22895395
[x]
Attachment Details

C#.NET Insert/Update values in DataTable Row

Asked by poultarp in Microsoft Visual C#.Net, C# Programming Language, Visual Studio .NET 2005

Tags: datatable, update, row, insert

Hi all

This might have been answered before, but I have been unable to find an answer I can use, so here goes....

I have a DataTable filled with data from an Excel file. Using a for-loop I run through each row in this DataTable and extract 3 values, which I then run through an SQL statement which returns 3 new values. I now need to update the row I got the original 3 values from in the DataTable with the 3 new values.

How do I insert the 3 new values in the correct places in the row?

How do I insert then in the SAME row as I got the 3 original values from?

Thanks in advance

Søren Augustesen

Start Free Trial
[+][-]10.16.2007 at 12:05AM PDT, ID: 20083605

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.16.2007 at 12:59AM PDT, ID: 20083772

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.16.2007 at 01:03AM PDT, ID: 20083785

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual C#.Net, C# Programming Language, Visual Studio .NET 2005
Tags: datatable, update, row, insert
Sign Up Now!
Solution Provided By: jaiganeshsrinivasan
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_1_20070628