I need help with this as i am spending far too much time on it. Moving
across from vba to .net hasnt been easy..

I need to return the value in a field of the last record in a sorted
dataset.

A brief example of anyone would be really helpful..

i would approach this by sorting the records and performing a count on
the records. Then returning the value in:

dataset.tables("MyTable").columns("MyCol")..

and also using (dataset.tables("MyTable").count) to get the last
record

help please!!

Re: returning the value of the last record in a dataset by Ben

Ben
Mon Jul 26 11:36:39 CDT 2004

dim rows as DataRowCollection
rows = dataset.Tables("MyTable").Rows
value = rows(rows.Count - 1)("MyCol")

Ben Lucas
Lead Developer
Solien Technology, Inc.
www.solien.com

"Winshent" <winshent-google@yahoo.co.uk> wrote in message
news:f511cd36.0407260629.5ed326e3@posting.google.com...
> I need help with this as i am spending far too much time on it. Moving
> across from vba to .net hasnt been easy..
>
> I need to return the value in a field of the last record in a sorted
> dataset.
>
> A brief example of anyone would be really helpful..
>
> i would approach this by sorting the records and performing a count on
> the records. Then returning the value in:
>
> dataset.tables("MyTable").columns("MyCol")..
>
> and also using (dataset.tables("MyTable").count) to get the last
> record
>
> help please!!