Q : The best way to handle multiple data loads...

Joined
Mar 3, 2005
Messages
9
Programming Experience
10+
I have this process working but from a performance point of view I'm not sure of the best way / generally approved way of doing this.

I have data in a form which has been loaded from a database. The user can change this information and save it back with a confirm button.

So far so good.

On some of the fields there are combo boxes for selection. These are to be populated from other database tables. At the moment all data loading is being done via a data reader.

My question is at what point should the combobox data be loaded? When all the form data is loaded in or only when the user actually accesses the combo box? Is it better to slow down the form load or create a slight delay when accessing a combo box. Is there a genreally accepted "best" way of doing this?

Cheers

Mike
 
It's pretty much as I stated in the original post. And it's more of a generic question than a specific problem I've got in a single form.

In the case where the information displayed in the form is loaded when the form is loaded but there are (for example) comboboxes available for selection on some fields which will use fields from the database should the comboboxes be populated when the form is loaded or only when the combobox is used for the first time?

I don't see any need to load them with data if the user never actually clicks on them for selection but I'm just wondering if there is an "industry standard" way of doing this that is favoured by coders.

Cheers

Mike
 
Mike, It seems like you know the answer ... however, there are specific situations where you cannot predict user's activity, what would be his/her next step (what if he/she decides to check what is inside those combos before save data like you said). So that's why is the best lo populate all combos at the beginning. Btw, there is nothing like you said "industry standard". Everything depends on your choice and decision based on your knowledge and experience.

Cheers ;)
 
Back
Top