E
Earl
This question isn't so much about code as it is about development process.
I'm focused on improving the performance of an app I've developed over the
last several months. One area that has troubled me is how long to maintain a
FILLed dataset across classes and even within classes.
For example, I have a rather large form class where I fill a dataset with a
couple of tables in order to generate the dataviews that in turn populate
grids, listboxes and such. Let's say I filled a dataset, creating a
dtSuppliers table. Once I'm finished there, I clear the dataset. Later, in
order to do an update or add a new record, what I'm currently doing is
REfilling - dataset (dtSuppliers), check for changes, do the update. This
does not seem efficient, but is nonetheless safe, because there are spots in
my code where I *must* clear the dataset.
So my question is, how long to maintain a dataset fill with a particular
table? What is safe, what is unsafe? There are a gazillion books out there
and tons of pieces of example code (and I think I"ve read quite a few of
both), but even the best of authors never comes out and explains how BEST to
handle the WHEN part of maintaining tables (as it relates to clearing
datasets) in a mid-to-large app. What I'm doing now works -- but I can't
imagine in any way this is the best or most efficient way.
I'm focused on improving the performance of an app I've developed over the
last several months. One area that has troubled me is how long to maintain a
FILLed dataset across classes and even within classes.
For example, I have a rather large form class where I fill a dataset with a
couple of tables in order to generate the dataviews that in turn populate
grids, listboxes and such. Let's say I filled a dataset, creating a
dtSuppliers table. Once I'm finished there, I clear the dataset. Later, in
order to do an update or add a new record, what I'm currently doing is
REfilling - dataset (dtSuppliers), check for changes, do the update. This
does not seem efficient, but is nonetheless safe, because there are spots in
my code where I *must* clear the dataset.
So my question is, how long to maintain a dataset fill with a particular
table? What is safe, what is unsafe? There are a gazillion books out there
and tons of pieces of example code (and I think I"ve read quite a few of
both), but even the best of authors never comes out and explains how BEST to
handle the WHEN part of maintaining tables (as it relates to clearing
datasets) in a mid-to-large app. What I'm doing now works -- but I can't
imagine in any way this is the best or most efficient way.