Time data

R

Ron Harter

I have a column in a table that is defined as type Time(7). When I get the
table into a dataset and try and retrieve the column containing the time I
get an exception. I am trying to put in a DateTime structure
evt.StartTime = dr.Field<DateTime>(4);
The code throughs an exception. How do I get the info from the DS?
 
R

Ron Harter

SQL Server 2008



Mark Rae said:
I have a column in a table that is defined as type Time(7).

What DRBMS is this...?

I get an exception.
The code [throughs] throws an exception.

One of the most irritating (and time-wasting) things you can do on a
public peer-to-peer technical newsgroup or forum is say that you "get an
exception" but not actually say what that exception is!

Please help us to help you...
 
R

Ron Harter

I am not sure the exception is important. What I am asking is if the line of
code is correct or how do you extract the time column from the DataSet. I
beleive the exception was InvalidCast



Mark Rae said:
[please don't top-post]
SQL Server 2008

Well, that's a start...

Did you read all of my first reply...?
 

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

Top