Bug Report Q574440
Visible to All Users

TcxDBTreeList - The "EDatabase error" exception occurs when opening a bound dataset and populating it with data within the BeginUpdate/EndUpdate block

created 11 years ago

Hello.

I use a dxMemDataSet which is bound to a cxDBTreeList.

When opening and filling the MemDataSet while being inside of a BeginUpdate / EndUpdate block, I will receive an Exception 'DataSet not in edit or insert mode'.

Attached is a demo example demonstrating the issue.

A simple workaround is to remove the BeginUpdate / EndUpdate block or just opening the MemDataSet outside of said block.

Before updating from 6.55 to 2013 v2.3 the code was working fine, though.

Regards,
Torsten Lang

Show previous comments (2)
DevExpress Support Team 11 years ago

    Hello,
    The problem is not solved yet. Meanwhile, I suggest that you use the TClientDataSet component instead. It has an equal functionality and can easily get data from the TdxMemData component using the "Assign Local Data…" popup menu item.

      Hello Paulo.
      Our problem right now is, that our application is really huge, it has a couple of hundred units and no one here has a clue which unit is affected by the bug. It would take weeks to manually check every unit and change it ;-)

        Hello.
        Do you have any ETA on this one? It's been two weeks now, and we are already postponing our release because of this :S
        Regards,
        Torsten Lang

        Answers approved by DevExpress Support

        created 11 years ago (modified 11 years ago)

        We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

        Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

        Additional information:

        Important note:
        The code fix that was included in the VCL 13.2.4 release was incomplete and caused the TcxDBTreeList - The "EDatabase error" exception occurs when editing data of a bound dataset within the BeginUpdate/EndUpdate block and FocusedNode not working when DataSet is set at runtime. issues. I have posted the modified (correct) hotfix code here, so please download and apply it to VCL 13.2.4 if you face the abovementioned problems with our TreeList.
        We appreciate your understanding.

          Show previous comments (8)
          DevExpress Support Team 11 years ago

            The BeginUpdate/EndUpdate block is used to avoid flickering if you need to change several control properties at once. But when changing the underlying data, only the DisableControls/EnableControls block is a reliable solution.

              Hello Paulo.
              Thanks for the clarification.
              Please think about the following scenario:
              Imagine a dataset is bound to two editing controls, and you need one control to update itself and the other control to not update itself when changing the underlying data.
              Until now I (and all of my colleagues at work) thought just using BeginUpdate/EndUpdate on the control that should not update would do the trick (and it did work like a charm this way until some DX updates ago).
              I'd need a major workaround to achieve the desired result now.
              Miraculously a DBGridView behaves differently, because it does not change the focus when iterating through the bound DataSet after the calling BeginUpdate, but the Tree does change its focus. This inconsistency makes it rather difficult to code bug free when using your controls (especially if the behavior changes with a DX update all of a sudden)
              If you really don't intend to change anything, I ask you kindly to at least consider changing the help files then.
              Let me quote from your help files: "TcxEditingControl.BeginUpdate - Prevents an editing control from being updated until the EndUpdate or the CancelUpdate method is called."
              I find this quite misleading, because as shown in my last example, contrary to the statement in your help files, some controls do in fact update themselves, even though BeginUpdate was called (focused node keeps changing).
              Best regards,
              Torsten Lang

              DevExpress Support Team 11 years ago

                Hello,
                I have created a separate report on your demand (TcxDBTreeList flickers when changing a bound dataset's active record within the tree list's BeginUpdate/EndUpdate method block) to avoid mixing several issues here (this issue has been fixed). Our developers will research the problem and try to find an appropriate solution.

                Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

                Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.