Retrieving a single value from a dataset

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Im using a data access layer that pulls everything back as a dataset. They
arent exposing the scalar return.
The dataset is populated with a single value from a database, the max() of
a date.
How is the fastest way to get a single value from a dataset consisting only
of that value?
Thanks, Mark
 
dim dt as DateTime = ctype(ds.Tables(0).Rows(0).Item(0), DateTime)
or
DateTime dt = (DateTime) ds.Tables(0).Rows(0).Item(0);
 
Back
Top