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);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top