Click here to Skip to main content
14,212,594 members
Rate this:
Please Sign up or sign in to vote.
See more:
hello,
Can I update a column of a table by the values of an array?
Posted
Updated 23-Jul-12 19:40pm
v2
Rate this:
Please Sign up or sign in to vote.

Solution 1

Hi,
I don't think so that you can update a table value with an array without having ID. For ID you can use HashTable(Key & Value pair). It will help you to update only those record which is having an unique ID.
Anyway check this out:
Update table using SqlDataAdapter[^]

--Amit
   
v2
Rate this:
Please Sign up or sign in to vote.

Solution 2

You question is not very clear but, yes, you can.
Just select the value using the particular index in the array and then save it to the database.
   
Comments
_Amy 24-Jul-12 1:46am
   
Anyway Abhinav, for selecting the particular index he needs an ID. Right?
Abhinav S 26-Jul-12 1:47am
   
Yes that is correct. He will need something to get the id to access the array element.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Cookies | Terms of Service
Web01 | 2.8.190619.2 | Last Updated 24 Jul 2012
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100