StrataFrame Forum

Type error while changing BO property

http://forum.strataframe.net/Topic7429.aspx

By Peter Jones - 3/12/2007

Hi,

I've deleted and recreated these two BOs a number of times now but I can't get past this problem and I've never seen the issue before. I created boMEI and boMEG and all seems to be normal in terms of generated code however, when I go into Properties and click the RequiredFields collection, I get the attached 'type error'. Can you give me some clue as to what I may have done wrong. All the expected fields appear in the ..Designer.vb file and they appear as properties in ..vb code, e.g. in _SetDefaultValues I can say, for instance, "Me.MEISequ = 0"

Cheers, Peter

By Trent L. Taylor - 3/12/2007

This message generally appears when you have defined the BOs but have not yet built your project.  If you have built your project and still get this message, then it is generally because the BOs are stored in the GAC and have already been cached in the AppDomain in which case you have to get out and come back into Visual Studio.

So build your project, get out of Visual Studio and come back in and then try to go to the Required Fields collection.  If you are using the GAC with the BO, then be sure to place the BO back into the GAC after being rebuilt and before coming back into Visual Studio.  If the problem persists after that then let us know and we will look at something else.

By Peter Jones - 3/12/2007

Hi Trent,

Spot on - I hadn't rebuilt the project. I guess in the past I was doing a rebuild so they would appear in the Toolbox without understanding what else the rebuild did. This time I went from BO creation directly into configuration before I even thought about doing a rebuild to put them in the Toolbox.

Cheers, Peter