StrataFrame Forum

FillMultipleDataTables sure works !

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

By Charles R Hankey - 3/6/2009

In my first big .NET app I have inherited the need to load at least 35 business objects with data that will be used for lookups, calculations etc.



In the appmain I have one call to one stored proc that fills all 35 business objects on one server trip (very fast) which are available as shared properties of a Lookupmanager class. Works just as advertised ! BigGrin



Now from anywhere in the app it is Lookupmanager.Lookups.BO.column to get a piece of data.



Very cool.
By Edhy Rijo - 3/6/2009

Congratulations Charles,

That sounds pretty good, I have used the FillMultipleData.. but just for 2 or 3 BOs.

Question, why are you using the AppMain.vb to load all these BO?

Also a comment if you need to improve the speed even better while loading it in the AppMain, you can use a separate thread to load all your BO while the AppMain continues its process to show the Main form.

By Bill Cunnien - 3/6/2009

Hi Charles,



Just curious...with 35 BOs, it is tough for me to assume that the data is static for all 35 BOs. That may be just the world that I live in.



Since you load everything for these BOs at startup, if there is any change in the data for any one of those BOs, then the user has to exit the app and restart. Is that right...or did you perfect a way of refreshing the BOs from time to time?



Thanks,

Bill
By Charles R Hankey - 3/6/2009

Hi Bill



These tables are all used for lookups and for calculations used in quoting for an insurance app. Yes, all 35 tables are static, except that they are subject to authorized users changing or adding records (this will happen rarely) If I understand correctly the issue you are raising is what happens to the other users who loaded the data when they started the app and who now have old lookup data loaded. In this app the frequency of updates on this particular data set and the limited authorization to change it probably would make it acceptable that a change would take place after hours and then everyone would have the changes the next day.



But the point is a good one, and for other parts of the app, this approach definitely will not work and data will be loaded much more dynamically. I'll really give this some thought as shared properties of this kind are very new to me and I know I haven't yet thought through all the implications.



I'll post updates as I go along Smile