Time data

  • Thread starter Thread starter Ron Harter
  • Start date Start date
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?
 
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...
 
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...?
 
Back
Top