Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error: missing update of ErrorProviderBrokenRules
Message
From
06/03/2006 07:55:19
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Error: missing update of ErrorProviderBrokenRules
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01101686
Message ID:
01101686
Views:
51
Hi,

I believe it is an error that ErrorProviderBrokenRules on mmBusinessRule is not cleared after an delete. Because it is not cleared, one can easily experience index out of range exceptions:

In the Windows Forms Jump (mere mortal 2.0) start do the following:

Add a new tabpage and fill it with an mmDataGrid, an mmDeleteuBtton, an mmNewButton and an mmSaveButton, and set binding source on all 4 controls to the Orders bo.

Now run the application and do the following:

1. Find the 'Picco' customer (Northwind database) in the mmPicker on the first tab.
2. Go to the new tab and click the new button and then the save button, which gives an error about a missing shipper as expected.
3. Click ok on the message box and give the row with the error in the grid focus.
4. click the delete button, which deletes the new row.
5. click save button which gives an index out of range error in the ClearAllRules method on the mmBusinessRule class.

This happens because this method uses the ErrorProviderBrokenRules which has not been updated after the deletion of the row, and therefore the index will be out of range.

I think that ClearAll on the business rule should be called in the PostDelete hook.

Any other suggestions or commentes much appriciated.

regards Stig Nielsson
Next
Reply
Map
View

Click here to load this message in the networking platform