Bug Report B34477
Visible to All Users

The "RowIndex out of range" exception occurs after a dataset has been re-queried

created 16 years ago

Hi,
Am afraid that I need your help.
Have a problem after having updated the VCL components that I use with delphi 2006 to the version dated November 2008.
After the update I recompiled an application that worked fine before, but now throws errors that I do not understand. It happens when closing an ado_query.
The exception gets raised by your unit cxCustomData line 2212:
procedure InvalidOperation(const S: string);
begin
  raise EcxInvalidDataControllerOperation.Create(S);
end;
Please advise/Help.
Much obliged!
Gr.,
Rik
Actual Results:
InvalidOperation('RowIndex out of range')
TcxCustomDataControllerInfo.CheckRowIndex(0)
TcxCustomDataControllerInfo.GetRowInfo(0)
TcxCustomDataController.GetRowInfo(0)
TcxCustomGridTableViewData.CreateRecord(0)
TcxCustomGridTableViewData.GetRecord(0)
cxCustomGridTableControllerCanFocusRecord($4D94794,0,nil)
TcxCustomGridTableController.FindNextCustomItem(-1,217,True,False,cxGridCustomTableView.cxCustomGridTableControllerCanFocusRecord,nil,0,False)
TcxCustomGridTableController.FindNextRecord(-1,True,False,False)
TcxCustomGridTableController.IsFinish
TcxGridDBDataController.GetNavigatorIsEof
TcxCustomGridTableView.NavigatorIsEof
TcxNavigatorControlButtons.GetButtonEnabled(3)
TcxNavigatorButton.GetInternalEnabled
TcxNavigatorViewInfo.UpdateButtonsEnabled
TcxCustomGridTableViewInfo.NavigatorButtonsStateChanged
TcxCustomGridTableView.RefreshNavigators
TcxCustomGridTableView.UpdateControl($76152E8)
TcxCustomDataController.UpdateControl($76152E8)
TcxCustomDataController.NotifyControl($76152E8)
TcxCustomDataController.BeforeGroupingNotification
TcxCustomDataControllerInfo.Update
TcxCustomDataControllerInfo.CheckChanges
TcxCustomDataControllerInfo.EndUpdate
TcxCustomDataController.EndUpdate
TcxCustomGridView.EndUpdate
TcxGridDBDataController.EndFullUpdate
TcxCustomDataController.UpdateStorage(False)
TcxCustomDataController.UpdateItems(False)
TcxCustomDataController.LayoutChanged([lcStructure])
TcxCustomDataController.CheckChanges
TcxCustomDataController.Change([dccLayout…dccFocus,dccSummary])
TcxCustomDataControllerInfo.ForwardChanges
TcxCustomDataControllerInfo.Update
TcxCustomDataControllerInfo.CheckChanges
TcxCustomDataControllerInfo.EndUpdate
TcxCustomDataController.EndUpdate
TcxCustomGridView.EndUpdate
TcxGridDBDataController.EndFullUpdate
TcxCustomDataController.RestructData
TcxDBDataController.RestructData
TcxDBDataController.ActiveChanged(False)
TcxCustomDataProvider.ActiveChanged(False)
TcxDBDataProvider.ActiveChanged(False)
TcxDBDataLink.ActiveChanged
TDataLink.SetActive(False)
TDataLink.UpdateState
TDataLink.DataEvent(deUpdateState,0)
TcxDBDataLink.DataEvent(deUpdateState,0)
TDataSource.NotifyLinkTypes(deUpdateState,0,True)
TDataSource.NotifyDataLinks(deUpdateState,0)
TDataSource.SetState(dsInactive)
TDataSource.UpdateState
TDataSource.DataEvent(deUpdateState,0)
TDataSet.DataEvent(deUpdateState,0)
TCustomADODataSet.DataEvent(deUpdateState,0)
TDataSet.SetState(dsInactive)
TDataSet.SetActive(False)
TDataSet.Close

Show previous comments (8)
Serge (DevExpress Support) 16 years ago

    Hi,
    Our investigation shows that the problem arises as a result of the code fix made in the report AV is thrown if an unidirectional SQLDataSet is activated, when the ExpressQuantumGrid is in Grid Mode. As a temporary patch, we recommend that you apply the following code fix:

    Delphi
    cxDBData.pas procedure TcxDBDataController.ActiveChanged(AActive: Boolean); begin if IsGridMode then <<< RestructData; inherited; end;

    However, we haven't yet finished our testing, and cannot guarantee that it will work correctly in all situations.
    Thanks,
    Serge

    DevExpress Support Team 16 years ago

      Hi Serge,
      I tried your suggestion:
      cxDBData.pas
      procedure TcxDBDataController.ActiveChanged(AActive: Boolean);
      begin
        if IsGridMode then <<<
          RestructData;
        inherited;
      end;
      First tests look promising! Will let you know if error pops up again.
      Tx a lot.
      Happy new year!
      Gr.,
      Rik

      Serge (DevExpress Support) 16 years ago

        Thank you for the verification, Rik. I'm happy that our workaround helped you. Let's wait for the official code fix.
        Regards,
        Serge

        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.