Re: Blank Date display problem



vovan wrote:
A couple of years
ago I read a big discussion on one of the programming forums about
using NULLs in date type of fields. As I remember some of people did
not want to use NULLs. Many others insisted on using NULLs when it
requires, for instance the date of death. Until the person is alive
this field contains NULL, not 1900, not X, not 'NOT SET'. Just NULL.
Who of those people were wrong. That discussion did not give any
answer. Most of the workstations running my project display blank field in
the grid if the date was not set yet. Only one workstation displays
1900 instead of blank for the same records from the same database.
Is it the fault of the program? Should it be rewritten, you think?


Null is pretty much inevitable if you work with databases much, even if you
don't store them directly.

Suppose you run a query with a left join, asking for each customer name from the
customer table, and the date of their latest purchase from the related purchases
table. You use a left join so that customers with no purchases will still be
included in the list. Guess what every database engine in the world will return
for the date of their latest purchase, if there are none? If you said Null, you
are right.

So stick with Null, you'll have to get used to it anyway. As for the rogue
machine that displays Null as 1900, I would say something is weird on their
machine. Do they have the exact same program? It is possible to format Nulls as
'1900', although why anyone would do that I do not know. I can't imagine it is a
setting in Windows. Maybe they need to reinstall some stuff. :)




.



Relevant Pages

  • Re: What does this NULL mean?
    ... > always will be NULLS in the real world." ... > comp.databases.theory thread "Does Codd's view of a relational database ... > presenting lots of possible reasons was a very bad argument because only ... management of systems with evolving schema, ...
    (comp.databases.theory)
  • Re: Newie Question (or am I nuts)
    ... It is a fundamental part of the Relational Model which Dr. E. F. ... database really relational?". ... > The problem is that c and c++ don't have the concept of nulls. ... > nulls in VB (or, in our case the VBA, but for all intensive purposes VB ...
    (microsoft.public.access.formscoding)
  • Re: What does this NULL mean?
    ... out of existence have no demonstrated understanding of the database change management environment, and specifically the management of schema evolution and its consequences in regard to the generation of nulls. ... An exception would be when he starts out by defining a Relation the way he does in his Intro to Database Systems, ... eliminating SQL from the ... ever materialises would lead to an exponential number of relvars with ...
    (comp.databases.theory)
  • Re: TIP#308: Choice of dict as the row representation
    ... names with the possibility of NULLs. ... place the onus on the database driver to disambiguate the names, ... you can specifically tell the database to insert whatever substitute ...
    (comp.lang.tcl)
  • Re: Linking tables
    ... Employee tables could have a 1 to 1 relationship with the Engineer table. ... Elimination of Nulls, Nulls cause problems in a database because they are ... Null or some database engine managed Default. ...
    (microsoft.public.access.tablesdbdesign)