Best practices

  • Thread starter Thread starter Michael Wong
  • Start date Start date
M

Michael Wong

Hello,

Sorry if my question has already been answered in this newsgroup or
elsewhere, but I don't seem to find what I need to know.

I have a filtered list of customers (just First and Last name). Next to
it is a panel with the selected customer's details, plus some other
information that I get from other tables.

The question is which method is better:
1) I retrived the customer's information on each selection in the list
2) I load all the information pertaining to the customers in the list,
then just display them as needed.

I am new to ADO.NET and any comments will be very much appreciated.

Thanks
 
For me this would depend on a couple of items. First if the list of
users was known in advance and it was probable that the user of the
application would be viewing the details of many of the records at a
sitting, and that the data would not change very frequently: I would
query the information from all the tables into a dataset and setup data
relations between them; then load them from the cached dataset as
necessary. If however any of the above conditions were not true I'd
start weighing the potential performance issues of multiple queries
against the need to have accurate and up to date data. If however all
three of the items above were not true then I would most likely go with
a read on demand strategy. I realize this isn't a heck of a lot of
help, but without more information (the above and things like network
latency and the like) it's kind of hard to get more specific.

Have A Better One!

John M Deal, MCP
Necessity Software
 
Hi John,

Thanks for your prompt reply.
Indeed, the user will probably be browsing the list of customers. The
list will not be frequently changed, so I'll try as you said to load all
data at once.
 
On the desktop/server app, generally, you would want to use an "on-demand"
strategy. I couldn't envision someone updating out-of-date payment
information, for example. For the ASP app, you have a whole lot of other
considerations to deal with.
 
Back
Top