save rows of a value into database

  • Thread starter Thread starter Angie
  • Start date Start date
A

Angie

datagrid ex.
a 1 checkbox
b 2 checkbox
c 3 checkbox

once a user selects these 3 rows from a datagrid and i
want to save the 1, 2, 3 value into the database how do i
do this?

I know how to determine the checkboxes and save data into
the database, but how do i pass the values into my sql
statement?? array??? how?

Thank you in advance.
 
you did not mention, what is the datasource for the datagrid.

If I assume you are using dataset as a datasource of the datagrid, you can
pass values by parameters or insert/update sql statement of the dataadapter.

Rajesh Patel
 
Thanks, Rajesh.

My datasource is a select statement against a table in
the db. I just didn't know how to store all the values
and be able to insert each one and figured that looping
through a sql statement would be a bad performance choice.

So is using the dataadapter with a dataset the best way
in your mind? I hope I make sense.

Thanks!!!!
 
Back
Top