Re: Date vs DateTime

From: Steve S (beach_bum99_at_hotmail.com)
Date: 03/25/04


Date: Thu, 25 Mar 2004 17:34:32 -0500

After much review today.... we have isolated the underlying issue to
this.... The parameter that is used for the COMPAIR in the WHERE portion of
the update/delete commands are causing the real issue... we have worked
around all the other issues and have come to accept the fact that we are
only going to be 95% accurate on the actual type calls.....

The rest of them we are going to need to rely on the programmers to provide
us with the proper type for the field they are requesting and HOPE the
database will take care of us.....

The reason why the WHEREs will not handle our DateTime is that the database
holds accurate information down to the 6th sig decimal figure on the
second.... and ADO seems like it only holds information down to the THIRD.
Therefore if we are dealing with a record that was created by another system
and a DateTime field was set by the other application, it is possible that
the value is down to the 6th figure.... hence ours will never match the
information. OOPS.....

ALOHA

"Jon Skeet [C# MVP]" <skeet@pobox.com> wrote in message
news:MPG.1accaaa99fccf0e298a48f@msnews.microsoft.com...
> Steve S <beach_bum99@hotmail.com> wrote:
> > While your statements are true when it comes to using these objects in
> > memory, it does make a difference when you are specifing them as
parameters
> > for adapter commands........
>
> Could you give an example of this? If you could give an example which
> needn't actually run, but which I can compile, that would be very
> helpful.
>
> Note that the .NET types and the DbType enumerations are entirely
> distinct things. It clearly makes a difference whether you specify that
> a parameter is of type DbType.Date or DbType.DateTime, but that's a
> different matter.
>
> --
> Jon Skeet - <skeet@pobox.com>
> http://www.pobox.com/~skeet
> If replying to the group, please do not mail me too



Relevant Pages

  • Re: Extracting Time from the SQL DateTime field.
    ... > Any help on extracting the time part from the datetime field in SQL ... > even though i had entered only the time part in the database when i ... > Visit Topic URL to contact author (reg. ...
    (comp.databases.ms-sqlserver)
  • Re: Concurrency violation
    ... datetime field and the dataset. ... the database, it compares its "Original data"of the row with what is in ... datetime values only upto second. ...
    (microsoft.public.dotnet.languages.csharp)
  • Extracting Time from the SQL DateTime field.
    ... Any help on extracting the time part from the datetime field in SQL ... even though i had entered only the time part in the database when i ...
    (comp.databases.ms-sqlserver)
  • Re: Concurrency violation
    ... database, it compares its "Original data"of the row with what is in the ... This comparison always result in difference in the datetime field. ... oAdapter.UpdateCommand.CommandText is like: "update aTable set ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: "code" tables?
    ... accurate information and for no other reason. ... I patiently explained to them that I first want to come up with a query ... The first is a situation where the database has been misdesigned. ... production software that depends on the existing table design, ...
    (comp.databases)