Re: Typed dataset: Time only data in SQL dateTime Field
- From: "Miha Markic [MVP C#]" <miha at rthand com>
- Date: Fri, 19 Jan 2007 09:19:18 +0100
Hi Jeff,
I would use a constant date, such as 1.1.2000 or something and add time to it.
--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/
"JeffDotNet" <JeffDotNet@xxxxxxxxxxxxxxxxx> wrote in message news:89C0A3A5-994F-4C13-885B-F146F6D47E6B@xxxxxxxxxxxxxxxx
I have an application that needs to insert records into a datatable via a
typed dataset. We are in the process of moving from access to Sql 2000. A
copy of the table exists in access and in sql2000.
I now have 2 typed datasets one pointing to a table in access and one
pointing to an identical table in sql 2000. In this datatable there is a
DateTime field expected to have only a time in it. When I insert records
using the access dataset it works as expected
insert (myTime.ToShortTimeString,yada,yada,yada)
However the same call when using the sql 2000 dataset throws an exception
saying that the date is out of range. How can I supply my sql 2000 typed
dataset to insert just the Time into the datetime field. Do I need to
perform a date time subtraction?
Any help on this would be greatly appreciated,
Thanks,
Jeff
.
- Prev by Date: Re: dataset fill brings all records?
- Next by Date: Re: Typed dataset: Time only data in SQL dateTime Field
- Previous by thread: dataset fill brings all records?
- Next by thread: Re: Typed dataset: Time only data in SQL dateTime Field
- Index(es):
Relevant Pages
|