How to add/update/delete more than 1 record in datagrid at one go i.e. how to handle batch updates
In C# windows application:
There is a datagrid. I add more than 1 record. How can I save all these records in table at one go?
Similary for update/delete
I am currently using the following code to handle one record:
int aa=Int32.Parse(dataGrid1[dataGrid1.CurrentRowIndex,0].ToString());
string ss=dataGrid1[dataGrid1.CurrentRowIndex,1].ToString();
string ins="Insert into test values("+aa+","+"'"+ss+"')";
dt=cc.conn(ins);
dt.AcceptChanges();

MythicalMeRank #6,347 · 269 reputationPosted Dec 23, 2004, 6:31 PM EST
amit_gupta14109 reputationPosted Dec 23, 2004, 6:39 PM EST
MythicalMeRank #6,347 · 269 reputationPosted Dec 23, 2004, 9:31 PM EST
amit_gupta14109 reputationPosted Dec 23, 2004, 9:39 PM EST
MythicalMeRank #6,347 · 269 reputationPosted Dec 24, 2004, 6:07 AM EST