hello
can anybody tell me how to store data from datagridview to sal server database.
How to store data from datagridview to database
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Suthish NairRank #92 · 22.8K reputationPosted Mar 28, 2011, 2:19 AM EDT
Sahil Jani196 reputationPosted Mar 28, 2011, 2:29 AM EDT
Using stored procedure, you can store the data of datagridview.
like;
INSERT INTO table2(ID,NAME)//for particular columns
SELECT ID,NAME
FROM table1
or
u need to write a STORED PROCEDURE like
CREATE PROCEDURE Update1
{
@name varchar(10)
}
AS
update[table]
set name=@name where ur condition
this name uneed to pass from the front end. here im updating name. this will update ur DB
IF MY ANSWER WILL HELP YOU IN YOUR CODE THEN CHECK THE BOX AS "MARKED AS CORRECT ANSWER"
Sam HobbsRank #107 · 20.5K reputationPosted Mar 28, 2011, 7:34 PM EDT