PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
Re: Data bound updates not updating
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
Re: Data bound updates not updating
![]() |
Re: Data bound updates not updating |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Can anyone at least tell me if this is how they do it? TIA.
Curt "Curt Tabor" <curt_tabor@cox.net> wrote in message news:QwGJa.43921$1e.3571@fed1read04... > Hello, I'm using the following code to change some data using OleDb data > adapters. Basically, I've got a form with a grid of data and I'm showing a > dialog and updating the changes if the user presses OK. This seems really > straight forward but there are a couple of problems. > > The data does not get updated to the database unless I make a second change. > Each time I edit the data in the dialog, only the previous chage will get > posted to the database. Sometimes it will not get posted at all. Also, the > grid on the calling form will not reflect the changes made to the data until > it gets focus. I must be doing something wrong. I just can't figure out what > it is. > > Thanks in advance for any feedback. > > public void Editxxx() > { > TDlgEditxxx DlgEditxxx = new TDlgEditxxx(); > > DlgEditxxx.tbxxxName.DataBindings.Add("Text", DataCtrl.dsMain, > "SOMEQUEREY.NAME"); > > DlgEditxxx.ShowDialog(); > > if (DlgEditxxx.DialogResult == DialogResult.OK) > DataCtrl.aDataAdapter.Update(DataCtrl.dsMain); > > DlgEditxxx.Dispose(); > } > > > -- > Curt Tabor > Lead Software Engineer > SmartDialolgue Inc. > > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

