Inputting data into Database using Datagrid
Hi,
I have a datagrid with 100 records.I have to put these records into the database.Just inserting new records into the database not like updating using datagrid.How to do this.Help is appreciated.Thank you.
[220 byte] By [
srijyothi] at [2007-11-20 8:24:45]

# 1 Re: Inputting data into Database using Datagrid
If your datagrid is bound to a dataset then you can use the TableAdapter's Update method to insert the data into the database. Take a look at this
http://msdn2.microsoft.com/en-us/library/ms233812(VS.80).aspx
In case your datagrid is not bound then you will have to use Command objects to do a manual insert. Loop through each record and manually execute Insert commands using the command object.