Re: Typed dataset: Time only data in SQL dateTime Field

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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


.



Relevant Pages

  • Re: Typed dataset: Time only data in SQL dateTime Field
    ... I can type in a Time alone directly into a sql DateTime field. ... I need to retain the format as it was in access. ... how be able to provide input to my typed dataset to replicate the behavior. ... I also noticed that the Sql import was able to replicate this format. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Query very Slow
    ... Correct Item Number and correct data for this ... I have two words because I'm working with COBOL program database and Cobol ... The Im_key is pointing to RQ_Imkey, Im1 is pointing to the ... Ok This is the SQL View of this program. ...
    (microsoft.public.access.queries)
  • Re: How add rows to table in Microsoft SQL 2008 Server
    ... linked tables pointing to SQL, or the equivalent with Access replaced ... you're not going to recommend he look at Dataphor! ... Server 2008 has table-valued parameters, ...
    (comp.databases.ms-sqlserver)
  • Re: Typed dataset: Time only data in SQL dateTime Field
    ... One typed dataset,, has been populated from a table in a ... of the table in the Jet database. ... At this point ds2 has no rows and you want to create a row in ds2 for every ... you are are going to 'update' ds2 to the SQL Server ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Query very Slow
    ... I have two words because I'm working with COBOL program database and Cobol ... In design view, I have a trust relationship built among: ... The Im_key is pointing to RQ_Imkey, Im1 is pointing to the ... Ok This is the SQL View of this program. ...
    (microsoft.public.access.queries)