best practice for data display

  • Thread starter Thread starter Rick
  • Start date Start date
R

Rick

VS 2005 designing a WinForm.

I have a typical CUSTOMER, ORDERS, ORDERDETAIL database. I want to show
these related items on a winform with either textboxes or datagridview
controls.

If I use the dataset designer to create a strongly-typed DS it will bring
into memory ALL the records in each table and then select a subset according
to the relations I have set when the user selects a CUSTOMER.

Of course, this is completely impractical when you have any quantity of rows
in any of the tables since they cannot all be brought into memory.

All the examples I see use the above approach for demonstration, but this
doesn't seem practical in a real world app.

So how do I do this right from the beginning? Do I create queries with a
param for the relation between the parent and child table and then respond
to a row change event?

I'm confused since I don't see any demo apps that use this senario which
surely must be quite common.

Thanks for any guidance,

Rick
 
I would forget using the design time wizard, I am personally of the opinion
it hides too much and makes it all too hard to use (although others will
disagree).

I would say parameterized queries sound about right. Every time you need to
retrieve a particular record and all its data, you go to the database
setting the parameter to the appropriate record key.
 
Rick,

If you drag from the datasourceview in the left pane a database table to
your screen, than you can tell by configuring the tableadapter exactly what
part horizontal you need by selecting the items (columns) and vertical by
adding the belonging Select script.

It is real a big approvement over the 1.1 version.

Cor
 
Back
Top