smalldatetime overflow error

From: P.S.Bell (pat_at_patbell.co.uk)
Date: 03/23/05


Date: Wed, 23 Mar 2005 17:22:52 GMT

Delphi 6 using ado tables I am transferring data to a SQL Server
database and am having trouble with datetime fields into
smalldatetime fields - I get "smalldatetime overflow error" I
have tried

smalldatetimefield.AsDate:=datetimetostr(doubledatetimevalue);

and

smalldatetimefield.Value:=Strtodatetime(datetimetostr(doubledate
timevalue));

Presumably I could just subtract a number fomr my doubledatetime
to get it to smalldatetime? Whatever... how do I get around this
problem?

Pat Bell



Relevant Pages

  • Debugging Scalar database functions in vS .NET (Parameter issue)
    ... I am trying to debug a function that I wrote on the SQL ... function has three parameters including two smalldatetime ... this input parameter ... The database output is the following: ...
    (microsoft.public.vsnet.general)
  • Re: Syntax problem?
    ... DECLARE @d1 SMALLDATETIME, @d2 SMALLDATETIME ... SET @d2 = GETDATE() ... "Eddie" wrote in message ... > I'm having trouble with something which I think I shouldn't be having ...
    (microsoft.public.sqlserver.server)
  • Re: Database Tripled In Size!!
    ... Check Database Properties> Files Page. ... Thursday night backup. ... from smalldatetime to datetime. ... have been related to the new data type. ...
    (comp.databases.ms-sqlserver)
  • DateTime problem: how to create datetime format hh:mm:ss AM/PM without the date
    ... my database has separate field for date and time so we can capture ... In Sql, date can be present in smalldatetime ... format, which contains only time hh:mm:ss AM/PM. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Date conversion
    ... If you need the result to be of type smalldatetime, ... Steve Kass ... > I have a database with a date field 'StartDate' as smalldatetime. ...
    (microsoft.public.sqlserver.programming)