Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
|
The reason it's throwing an exception is that you're filling the business object within the constructor. When you are in the designer, all code within the constructor is executed at design-time because the designer creates instances of the objects at design-time. When your objects are created, they're trying to fill themselves, and since the DataSource("") is the data source being used by StrataFrame, it cannot find your tables, and therefore cannot fill the business object at design-time. Your best solution is to remove the FillDataTable method from the constructor and do one of two things: 1) Create a Shared "factory" method that will create new instances of the business objects and fill them before returning their references, or 2) Just manually call the FillDataTable method after the object is created.
|