CSLA 4.2.2 to 4.5.x

CSLA 4.2.2 to 4.5.x

Old forum URL: forums.lhotka.net/forums/t/12449.aspx

jasona22 posted on Thursday, March 06, 2014

I am implementing the upgrade and after a namespace fix, I am running into the following:


I have a DataPortal_Fetch that looks like:

Private Shadows Sub DataPortal_Fetch(ByVal criteria As ...)


Using dr As IDataReader = New SafeDataReader(obj.Fetch( criteria)

While dr.Read()


End While

End Using


End Sub


Before the upgrade everything has been working.  After, I get a "Can not change a read-only list or collection" error.

Whats the new method for loading an InfoList?


PS.  Why does the CSLA .NET site keep throwing Script errors and crashing when using IE?  Its done this as long as I can remember and I figure I will mention it now.  :)


Thanks in advance for your assistance. 



ajj3085 replied on Friday, March 07, 2014

It doesn't look like your setting IsReadOnly to false before adding elements to the list, assuming this is a read only list base.  Dont forget to set it back to true when you're done.

What I dont understand is why this was working before as Csla has required this for a while, so it could be something else but without more code its hard to say.

MichelRenaud replied on Tuesday, August 19, 2014

I just had the same problem upgrading from 4.3.  Some of this code dates back to 2008 when we first developed under CSLA 3.0, so that was a weird one this morning.  Good thing I found this thread.  Easy fix! Smile

jasona22 replied on Monday, March 10, 2014

You are correct.  The ReadOnly flags were not there and had not been for some time.  This was on child list bo.  I guess it is good we upgraded.  Seems the code had an issue somewhere along the way and didn't require that or something. 

Copyright (c) Marimer LLC