ANSI NULL default

RobertMoRobertMo Member Posts: 484
edited 2008-05-23 in Navision Attain
When creating new columns I want them to be NULL-able. There is an option ANSI NULL Default in New/Alter Database (SQL), but the the columns are always created with NOT NULL. I have checked default settings on db, but nothing helps. What am I missing ?

Now I go to EM and modify the columns there, but I would like to do it without this...

You can read in help:
ANSI NULL default: Here you can specify whether the database default NULL settings for column definitions and user-defined data types are to be applied. When you select this option, all user-defined data types or columns that have not been explicitly defined as NOT NULL are set to allow NULL entries. Columns that have been defined with constraints follow the constraint rules, regardless of this setting.
           ®obi           
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

Comments

  • John_ReinholdJohn_Reinhold Member Posts: 19
    After four years nobody has solved this...

    I olså need to be able to insert a record within NAV and allow some fields to set to NULL.


    RobertMo wrote:
    When creating new columns I want them to be NULL-able. There is an option ANSI NULL Default in New/Alter Database (SQL), but the the columns are always created with NOT NULL. I have checked default settings on db, but nothing helps. What am I missing ?

    Now I go to EM and modify the columns there, but I would like to do it without this...

    You can read in help:
    ANSI NULL default: Here you can specify whether the database default NULL settings for column definitions and user-defined data types are to be applied. When you select this option, all user-defined data types or columns that have not been explicitly defined as NOT NULL are set to allow NULL entries. Columns that have been defined with constraints follow the constraint rules, regardless of this setting.
    Regards,
    John Reinhold
  • DenSterDenSter Member Posts: 8,307
    NAV does not understand NULL, it will cause errors, not a matter of IF there will be errors, but WHEN.
  • ara3nara3n Member Posts: 9,256
    One example would be filtering doesn't' work as you expect.

    If you filter on a field that allows NULL.

    If you filter on blank

    setrange(MyField,'');


    What do you expect to get?


    Same applies to option or any other datatypes.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • garakgarak Member Posts: 3,263
    sorry Navision doesn't support NULL values in fields. :-(
    One reason is the compatibility to the old native database engine
    Do you make it right, it works too!
Sign In or Register to comment.