Board index » delphi » Dataset not in Edit or Insert Mode
Bj?rge S?ther
![]() Delphi Developer |
Tue, 02 Nov 2004 01:26:19 GMT
Dataset not in Edit or Insert Mode
"Tor Anders Johansen" <m...@toranders.com> skrev i melding
news:5f88c910.0205160056.7266b12e@posting.google.com... Quote> Im trying to post changes back to the dataset before if (tlRegValue.DataSource.DataSet.State in [dsEdit, dsInsert]) then Quote> tlRegValue.DataSource.DataSet.Post; // <- stops here! don't know for sure what situations make datasource.state differ from the underlying dataset's state, but I've allways been using the dataset itself. *Especially* a check like you do, where DataSet.Post; causes an exception if not in edit/insert state. ...btw, this is an example of code that would be much more readable when -- |