471,325 Members | 1,560 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,325 software developers and data experts.

update database using Dataset

Hai,
I've displayed all data in a datagrid. the datasource is a dataset.
the user can modify the data in the datagrid.
the updated data in the datagrid to be updated in datatable.
i used the following snippet,but no effects.

if(dsSalaryslip.HasChanges(DataRowState.Modified))
{
DataTable dtChanges = dsSalaryslip.Tables["tblSalaryList"];
int iRow = dgSalarySlip.VisibleRowCount ;
for(int icount=0;icount < iRow-1; icount++)
{
dtChanges.Rows[icount][0]=dgSalarySlip[icount,0];
dtChanges.Rows[icount][1]= dgSalarySlip[icount,1];
}
}
dtChanges.AcceptChanges();

tel me how to do update database using dataset?

Feb 15 '06 #1
0 3538

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Joe Fetters via .NET 247 | last post: by
1 post views Thread by Mike Hnatt | last post: by
13 posts views Thread by abdoly | last post: by
reply views Thread by Vijay Balki | last post: by
5 posts views Thread by PAUL | last post: by
8 posts views Thread by Zorpiedoman | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.