Hello jaiganeshsrinivasan
"Update the CURRENT row of the datatable with the new value"
How do I update the current row of the datatable with the new data in the correct places?
Regards
Søren Augustesen
Main Topics
Browse All TopicsHi 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
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: jaiganeshsrinivasanPosted on 2007-10-16 at 00:05:54ID: 20083605
1)
for loop
'you get the values here
getvalue
'get the new value from the SQL server (using sme sql statement)
GetNewSQLValue
'Update the CURRENT row of the datatable with the new value
next
2) keep a record of what is the ID of the OLD values that you are retriving...
after fetching the records from the SQL table...use the ID that you have saved before and update the records accordingly...