Re: Datatable updating pb...
- From: "Eliyahu Goldin" <removemeegoldin@xxxxxxxxxxxxxx>
- Date: Thu, 18 Aug 2005 17:57:37 +0200
You lneed to call AcceptChanges method on either DataRow or DataTable or
DataSet.
The following is from the MSDN Library topic:
You can confirm edits by calling EndEdit or you can cancel them by calling
CancelEdit. Note that while EndEdit does confirm your edits, the DataSet
does not actually accept the changes until AcceptChanges is called. Note
also that if you call AcceptChanges before you have ended the edit with
EndEdit or CancelEdit, the edit is ended and the Proposed row values are
accepted for both the Current and Original row versions. In the same manner,
calling RejectChanges ends the edit and discards the Current and Proposed
row versions. Calling EndEdit or CancelEdit after calling AcceptChanges or
RejectChanges has no effect because the edit has already ended.
Eliyahu
"fh" <fh@xxxxxx> wrote in message news:de26ko$b97$3@xxxxxxxxxxxxxxxxxxxxx
> thanks for your answer
> but when I wrote, reload the data,
> I meant from the dataset modified (apprently not...)
>
> Eliyahu Goldin wrote:
> > Franck,
> >
> > EndEdit doesn't save data to the database, it just ends the edit
occuring on
> > the row.
> >
> > Eliyahu
> >
> > "fh" <fh@xxxxxx> wrote in message
news:de24o2$ad8$1@xxxxxxxxxxxxxxxxxxxxx
> >
> >>Hello,
> >>
> >>I modifie one row of a datatable
> >>with this code
> >>
> >>DataRow drCurent = _dsDowntime.Tables["PPE_DOWNTIME"].Rows[numRow];
> >>drCurent.BeginEdit();
> >>drCurent["Automatic"]=txbCAuto.Text;
> >>drCurent["DowntimeStart"]=txbbeg.Text;
> >>drCurent["DowntimeEnd"]=txbEnd.Text;
> >>drCurent.EndEdit();
> >>
> >>but i can't see any change when i reload the data
> >>even if i ask for their current state
> >>
> >>Any help please
> >>Franck
> >
> >
> >
.
- Follow-Ups:
- Re: Datatable updating pb...
- From: fh
- Re: Datatable updating pb...
- References:
- Datatable updating pb...
- From: fh
- Re: Datatable updating pb...
- From: Eliyahu Goldin
- Re: Datatable updating pb...
- From: fh
- Datatable updating pb...
- Prev by Date: Re: populate checkboxlist from XmlDataSource (ASP.net 2.0)
- Next by Date: Re: Compilation Error "The name Convert is not declared"
- Previous by thread: Re: Datatable updating pb...
- Next by thread: Re: Datatable updating pb...
- Index(es):
Relevant Pages
|