J
John Dann
I need to perform some aggregate stats on an ado.net dataset.datatable
(which just contains numeric data), nothing too complicated, just eg:
** max and min values in a column
** row index of where the max and min occurred
** column mean
I'm not aware that there are any ado.net 'native' functions to do
this specifically on datasets (but tell me if I'm wrong on this!).
This is also a function that will be called iteratively and
frequently, so performance is not irrelevant.
Question is what the best way of approaching this might be? There are
obviously several options like:
1. Iterating through all the rows of each column as required and
writing the routines 'manually' to do the calculations required.
2. A variant on [1] of maybe assigning the column to an array (but
presumably I'd need to populate this iteratively from the dataset?)
before doing the calculations (in case this might improve
performance).
3. Populate some third party data object (eg the C1 DataExpress class,
which does offer aggregate functions 'built in') with the dataset
table.
4. As [3] but use eg a data grid that offers similar functions.
5. Anything else??
Anyone have any views please on what might be the best approach to
try?
JGD
(which just contains numeric data), nothing too complicated, just eg:
** max and min values in a column
** row index of where the max and min occurred
** column mean
I'm not aware that there are any ado.net 'native' functions to do
this specifically on datasets (but tell me if I'm wrong on this!).
This is also a function that will be called iteratively and
frequently, so performance is not irrelevant.
Question is what the best way of approaching this might be? There are
obviously several options like:
1. Iterating through all the rows of each column as required and
writing the routines 'manually' to do the calculations required.
2. A variant on [1] of maybe assigning the column to an array (but
presumably I'd need to populate this iteratively from the dataset?)
before doing the calculations (in case this might improve
performance).
3. Populate some third party data object (eg the C1 DataExpress class,
which does offer aggregate functions 'built in') with the dataset
table.
4. As [3] but use eg a data grid that offers similar functions.
5. Anything else??
Anyone have any views please on what might be the best approach to
try?
JGD