Re: Under what circumstances would GetDate() return NULL?



is this table involved in merge replication or RDA with tracking on?
is it possible some code path executed an INSERT statement and
specified a null value for the ErrorTime column? it does accept
nulls. the default value only kicks in which you omit this column
from your INSERT statement entirely.
--
Darren Shaffer
..NET Compact Framework MVP
Principal Architect
Connected Innovation
www.connectedinnovation.com

"Jon Brunson" <JonBrunson@NOSPAMinnovationsoftwareDOTcoPERIODuk> wrote in
message news:uDyg$Y3iFHA.2904@xxxxxxxxxxxxxxxxxxxxxxx
> We have an error log on our handheld system in SQLCE. The table is created
> as follows:
>
> CREATE TABLE Errors (
> ErrorTime datetime DEFAULT GetDate(),
> DeviceID bigint NOT NULL,
> UserID bigint NULL,
> ProcedureID bigint NULL,
> QuestionID bigint NULL,
> Location nvarchar(255) NULL,
> ErrorText nvarchar(255) NULL,
> SyncStatus tinyint NULL
> )
>
> For some unknown reason one day, and never since, the ErrorTime column had
> NULLs in it. I didn't think it was even possible for GetDate() to return
> NULL.
>
> I'm completely clueless on this one.


.



Relevant Pages

  • Re: Under what circumstances would GetDate() return NULL?
    ... As you can see, I'm not inserting anything into the ErrorTime column, so the only explaination I can come up with is either some weird bug in SqlCe, it's ADO.NET interface, or GetDate() returned NULL. ... > DeviceID bigint NOT NULL, ...
    (microsoft.public.sqlserver.ce)
  • Under what circumstances would GetDate() return NULL?
    ... We have an error log on our handheld system in SQLCE. ... DeviceID bigint NOT NULL, ... For some unknown reason one day, and never since, the ErrorTime column had NULLs in it. ... I didn't think it was even possible for GetDate() to return NULL. ...
    (microsoft.public.sqlserver.ce)