hello
can anybody tell me how to store data from datagridview to sal server database.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sam HobbsPosted Mar 28, 2011, 11:34 PM
Sahil JaniPosted Mar 28, 2011, 6:29 AM
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"
Suthish NairPosted Mar 28, 2011, 6:19 AM