Click here to Skip to main content
14,334,742 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi friends,

Can someone help me out how to add/insert data from a LISTVIEW control which has details about a product ex:
product_id,product_code,description,price which should be added to a SQL table.

How to insert the data from this LISTVIEW to a table.. I need the code plzz help.
Updated 18-Dec-10 19:39pm
Abhinav S 19-Dec-10 8:57am
What have you tried so far?

1 solution

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

Solution 1

Asking/Providing code is not encouraged here. You need to try, make some effort and ask specific question on the issue faced.

Out here, all you need is to loop through the list. Get the listitems one-by-one. Get the details of the product, prepare a insert query for it and send it to database for insert. This would be repeated for all the items in the list. Now, please try!
OriginalGriff 19-Dec-10 7:54am
The OP responded as an answer:
"In this site big words are used to warn people who seek help not to be rude... See what these people who are answering are doing now...Is this not a rude answer?Is the admin watching? I am a learner and many things i have learnt on my own.. Sometimes we don`t understand how to put our doubts in words.. But this is not the way to answer so arrogantly Mr Sandeep Mewara"
OriginalGriff 19-Dec-10 7:55am
He also posted it as a separate question, which I answered.
To be honest, I don't think you were rude or arrogant, hence the 5.
fjdiewornncalwe 19-Dec-10 11:42am
5 from me as well. I came here from the link provided in the OP's other "question" referenced by Griff above with the eager anticipation of seeing something rude from Sandeep, because I thought it would be quite the event... Way to disappoint me with a perfectly appropriate and polite answer...
su_ma2010 19-Dec-10 21:40pm
I am saying this again,i am a fresher and trying to learn things on my own.. I did not know ABC of DOT NET few months back.. with my own knowledge i am trying to develop a site. I am not understanding how to save data of LISTVIEW into a table. For that nobody is ready to answer nor read my Qs properly.Thanks i dont think this site can help me. sometimes we dont understandhow to put our doubts in words..

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

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