G
Guest
Since the original thread is marked as answered, I thought I'd post here to
ensure visibility.
Hi John and Steven,
I'm going the dataset route as access doesn't seem to be too keen on that
level of complexity in joins. Anyway, I'm curious as to why it makes more
sense to fill a datatable and then contsruct a new datatable from the first
one. Why not just create a datatable based off of a datareader? To be honest,
I'm not too familiar with the other method of accessing data through a data
table. I'm more used to a forward-only cursor. I invision enumerating through
the datareader and for each entry saying something like,
"If username doens't already have a datarow, create one. Now, add hours to
the appropriate column."
So it would create the row if necessary, and then in either case, would add
the hours. Is there a way to do this type of check? it would avoid the need
to enumerate through the datasource adding all the rows and then re-enumerate
through to add hours.
I guess I'm just not sure of how to enumerate through a datasource which
gives you this level of flexibility. My mental model has always invovled
working around the narrow confines of a foreward only cursor and not a random
access model. Any thoughts?
-Ben
ensure visibility.
Hi John and Steven,
I'm going the dataset route as access doesn't seem to be too keen on that
level of complexity in joins. Anyway, I'm curious as to why it makes more
sense to fill a datatable and then contsruct a new datatable from the first
one. Why not just create a datatable based off of a datareader? To be honest,
I'm not too familiar with the other method of accessing data through a data
table. I'm more used to a forward-only cursor. I invision enumerating through
the datareader and for each entry saying something like,
"If username doens't already have a datarow, create one. Now, add hours to
the appropriate column."
So it would create the row if necessary, and then in either case, would add
the hours. Is there a way to do this type of check? it would avoid the need
to enumerate through the datasource adding all the rows and then re-enumerate
through to add hours.
I guess I'm just not sure of how to enumerate through a datasource which
gives you this level of flexibility. My mental model has always invovled
working around the narrow confines of a foreward only cursor and not a random
access model. Any thoughts?
-Ben