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
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.
Hi Rik,
We've already received such reports. In particular, take a look at the report "RowIndex out of range" after installing build 40. Although, we haven't managed to replicate the problem on our machines, I recommend that you try the suggestions from that report.
If the problem still persists, and you encounter any difficulties when searching for the cause, please provide your project. We can then take a look at it to determine the cause, and try to find a solution.
Thanks,
Serge
Hi Thanks for your reply,
I have read the suggested reports, but could not find a solution in there.
What is the 'provider mode' for a grid and what dows when 'the record id' is
supported?
It looks like the same happens with me: the number of records changes for an
ado query that is linked to a grid, but isn't it quite essential that you
can do this. What would be a go around?
Gr.,
Rik
Hi Rik,
The suggested workaround was to call the dataset's DisableControls and EnableControls methods when modifying its contents. Please try this approach. If the problem still persists, and you encounter any difficulties when searching for the cause, please provide your project. We can then take a look at it to determine the cause, and try to find a solution.
Thanks,
Serge
Hi Guys,
There's definitely something dodgy going on!
I worked all night to find a solution (am on a deadline for end of year!).
After having read the reports on the subject that you suggested I threw away
the grid that was part of the project and possibly created the error. I
created a new one. Thought I had found the solution and at first it seemed
okay on a this 'fresh' grid. Also it's fine on a TdbGrid.
However, when I got futher in the customization of the grid the error
reappeared. Looks like it has to do with formatting strings in the grid
(alignment???). I did not do this exercise as an error analysis and I did
not try after each little step of changing the grid (ceteris paribus).
Therefore I still do not have my finger behind the cause of the problem. I
do not think I do something wrong as the application throws errors after the
update (and I did not do changes to the application), only recompiled.
I cannot send you my project. I've seen that a project that is sent to you
gets into the knowledge base as attachment and is 'freely' downloadable. Not
the thing my company would like.
What is next? Do I need to start all over again and repeat the entire
process and work another night to find out for you what causes the error?
I work with delphi 2006 on a SQL server database and do 'standard' stuff
that I have been doing for years with your components. Before all was well,
after the update it does not work anymore and I cannot send out updates to
my clients :(.
Please guys, give me more details. My head is on the block and the problem
seems to be outside my circle of influence.
Gr.,
Rik
Hi Guys,
Maybe I found something that could help you solve the problem.
I created a new grid (again!, see previous message) for the datasource.
All's well (at least it looks like it, tried many 'requeries', no error).
However, when I click on a column header to set a sort order during run time
the Error message reappears when I do a close and open on the ado_query that
is the grids datasource (with a new SQL statement, resulting in a different
number of rows).
If I 'fixate' the sort order of the column in the properties of the grid in
design time and then restart the application the error appears immediately
when I 'requery'.
In fact, when I sort on any column in the grid (tried several datatypes,
date, string, float) the exception gets thrown each time when I 'requery'
the datasource. If I do not sort on any column, it seems to be fine.
Ofcourse this 'analysis' is not very scientific and very trial and error.
Hope this will help.
Gr., Rik
Hi Guys,
I've created an almost empty project showing the problem…
Please restore devx.bak into a sql server environment (SQL server 2005
database).
Then change the connection information in the project (ado_connection) so it
can find the database etc…
Run the application.
Click connect to db.
Then Click All.
When records show, sort the column 'datum' by pressing on the columnheader.
Then Click Limited # and the error pops up.
Wonder what I'm doing wrong.
Let me know if you need assistance.
Much obliged!
Tx&Gr.,
Rik
Hi Rik,
Thank you for the attached project. I've attached the video illustrating how your sample works on my machine. It appears to work correctly.
Sorry, I can't give you any advice on how to solve this problem until I reproduce it.
Thanks,
Dimitros
Hmm, It's getting interesting.
Tx for the video ;)
The problem occurs with me in design time and run time, with my clients at run time with the compiled versions from after the update.
Attached a new project, including the executable. Please run the attached executable and see the error pop up. You you can set the connectionstring in the GUI before you connect to the database). When I sort on 'datum' and press 'limited #' and 'all' a number of times the error pops up.
Many tx and greetings.
Gr.,
Rik
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:
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
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
Thank you for the verification, Rik. I'm happy that our workaround helped you. Let's wait for the official code fix.
Regards,
Serge