>I learned today that an insert statement I am generating out of a
>DataSet which gets populated straight from SqlDataReaders is not giving
[quoted text clipped - 24 lines]
>determine the column's type and then apply the proper formatting to the
>string.
There's a difference between the storage of datetime values in the
.NET framework and SQL Server. Read these articles for some details of
the difference and some possible workarous:
http://www.velocityreviews.com/forums/t111968-datetime-problem.html
http://www.eggheadcafe.com/articles/20021111.asp
http://blogs.wdevs.com/angelos/archive/2005/06/02/3660.aspx
SenseiHitokiri - 15 Nov 2006 17:24 GMT
> >I learned today that an insert statement I am generating out of a
> >DataSet which gets populated straight from SqlDataReaders is not giving
[quoted text clipped - 34 lines]
>
> http://blogs.wdevs.com/angelos/archive/2005/06/02/3660.aspx
Thanks that really helped me to understand the difference between the
two types but it leaves me with this question which is half-aimed at
the world and half-aimed at Microsoft. Why would a dataset fill itself
with a datatype that isn't the same as the table's especially when I'm
using Microsoft SQL Server. I mean it's looking like my options are
either to create some new calculated field in the table ( which I don't
actually have permission to do since it would be modifying some clossal
beast I'd rather not modify haha ) or creating a filter method that
will append a SQL convert function call to the select column name.
Since doing this would quite frankly "suck" I was hoping there would be
some way of telling the dataset to use the SqlDateTime thus persisting
the precision.