Problem after upgrade to 1.6.1


Author
Message
Chan
Chan
Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

I am facing problem after upgrade 1.6.1. Now, whenever I click new button, I will hit error below even though I have set AllowNullValueOnNewRow = false. Before this, everything just working fine. Any ideas?



System.InvalidCastException was unhandled by user code

Message="Specified cast is not valid."

Source="InventoryBusinessObject"

StackTrace:

at JK.Inventory.Product.BusinessObject.ItemsBO.get_Recalled() in F:\Projects\Inventory\InventoryBusinessObject\Product\ItemsBO.Designer.cs:line 980

at JK.Inventory.Product.BusinessObject.ItemsBO.Field_Recalled_Descriptor.GetValue(Object component) in F:\Projects\Inventory\InventoryBusinessObject\Product\ItemsBO.Designer.cs:line 2545

at System.Windows.Forms.BindToObject.GetValue()

at System.Windows.Forms.Binding.PushData(Boolean force)

Chan
Chan
Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
I tried to restore back those DLL, but it will crash VS, cause I am unable to open my project.



Please advice. URGENT!!!
Chan
Chan
Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

Just to add on, 1.6.1 mentioned is refering to assemblies posted in forum as patch.



Thank you
StrataFrame Team
S
StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
1) Are you explicitly setting the value of the Recalled field to DBNull.Value in the SetDefaultValues()?

2) Are any of the other fields in the new row DBNull.Value also, or just the Recalled field?

3) Is it trying to cast a DBNull.Value to a Boolean, or something else?

Chan
Chan
Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,



1) Are you explicitly setting the value of the Recalled field to DBNull.Value in the SetDefaultValues()?



No, I doesn't set DBNull.Value to recalled field. Beside, the error occurred BEFORE SetDefaultValues event fired.



2) Are any of the other fields in the new row DBNull.Value also, or just the Recalled field?



It happen to ALL fields.



3) Is it trying to cast a DBNull.Value to a Boolean, or something else?



To Boolean. The same problem happen to other fields as well, which is integer.



Please advice. It is urgent.



Thank you
StrataFrame Team
S
StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Is there more to the stack trace, or is what you posted in the first post all of it?  I'm wondering if we could get back to what is causing the binding to update immediately after you add the new row... the binding shouldn't be updating until after all of the values are initialized and the SetDefaultValues() is called.
Chan
Chan
Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,



>   InventoryBusinessObject.dll!JK.Inventory.Product.BusinessObject.ItemsBO.CategoryID.get() Line 452 + 0x2e bytes   C#

   InventoryBusinessObject.dll!JK.Inventory.Product.BusinessObject.ItemsBO.Field_CategoryID_Descriptor.GetValue(object component = {JK.Inventory.Product.BusinessObject.ItemsBO}) Line 1841 + 0x29 bytes   C#

   [External Code]   

   InventoryApplication.exe!JK.Inventory.Application.AppMain.Main() Line 45 + 0x6 bytes   C#

   [External Code]   



I checked my code again, and found that as you suspected it might be caused by data binding. It works fine If I just



ItemsBO loBO = new ItemsBO();

loBO.Add();




In my project, the error happen at least two fields which :-



1. Bind to SF's check box

2. Custom lookup control inherited from DevExpress lookupedit.



How should I check next?
Chan
Chan
Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi.

Just curious, any ideas why didn't the error happen in prior version? Anything changed?
Chan
Chan
Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

Any possible to get the full source code for 1.6.1 (as posted at forum) so that I could debug?



You helps are much appreciated.



Thank you
Chan
Chan
Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

I have successfully reverted back all SF assemblies. And now my application is working fine. So, I am sure something goes wrong with the latest 1.6.1 as posted at forum. Either my mistake or SF source code bug. How could I clarify this?



I tried to disassembly MicroFour Strataframe Business.dll, but failed



System.IndexOutOfRangeException: Index was outside the bounds [of] the array.

at Reflector.CodeModel.Memory.ParameterDeclarationCollection.get_Item(Int32 index)

at ᜢ.ᜀ.ᜁ(IEventDeclaration A_0)

at ᜢ.ᜀ.ᜃ(ITypeDeclaration A_0)

at ᜢ.ᜀ.ᜀ(INamespace A_0)

at ភ.ᜀ(ITypeDeclaration A_0, String A_1, ILanguageWriterConfiguration A_2)

Imports MicroFour.StrataFrame

Imports MicroFour.StrataFrame.Data



I need to changes of Browse Dialog Date setting. Please help.



Thank you
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search