R
Rick
VS 2005 pro.
I have a strongly typed dataset which I generate using the designer. From
the xsd file I set the relations between the CONTACTS table to the ORDERS
table to the ORDERITEMS table. Then I put some DataGridViews on the form
and open.
In the Load event of the form the Fill methods are used in the three tables.
As I step through by line, I can see the CONTACTS (1500 rows) is pretty
quick and the ORDERS (55,000 rows) is slower but the ORDERITEMS (5 million +
rows) churns on and on until I run out of memory.
If I leave out the ORDERITEMS datagridview, the form opens and the
parent-child relations are good.
It seems like the Fill method is taking ALL the rows from the DB and only
displaying the subset I want based on CONTACT. I would have thought that it
would only "hit" the DB when it had a record in the CONTACTS table as a
parent.
Do I have to setup my relations with a parameter to not retreive all rows
from the DB, or is this what is happening?
Rick
I have a strongly typed dataset which I generate using the designer. From
the xsd file I set the relations between the CONTACTS table to the ORDERS
table to the ORDERITEMS table. Then I put some DataGridViews on the form
and open.
In the Load event of the form the Fill methods are used in the three tables.
As I step through by line, I can see the CONTACTS (1500 rows) is pretty
quick and the ORDERS (55,000 rows) is slower but the ORDERITEMS (5 million +
rows) churns on and on until I run out of memory.
If I leave out the ORDERITEMS datagridview, the form opens and the
parent-child relations are good.
It seems like the Fill method is taking ALL the rows from the DB and only
displaying the subset I want based on CONTACT. I would have thought that it
would only "hit" the DB when it had a record in the CONTACTS table as a
parent.
Do I have to setup my relations with a parameter to not retreive all rows
from the DB, or is this what is happening?
Rick