1-0-DBNull

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Brenny

    #1

    1-0-DBNull

    Hi,

    I'm using access database and a table has a boolean column.
    I want to hold 1,0 and DBNull values in this column.
    But I cannot DBNull value, how can I hold DBNull value in the access
    database in boolean column?


  • Benny Raymond

    #2
    Re: 1-0-DBNull

    I don't think boolean columns support dbnull

    Brenny wrote:[color=blue]
    > Hi,
    >
    > I'm using access database and a table has a boolean column.
    > I want to hold 1,0 and DBNull values in this column.
    > But I cannot DBNull value, how can I hold DBNull value in the access
    > database in boolean column?
    >
    >[/color]


    --
    Benny Raymond

    Comment

    • Kevin Spencer

      #3
      Re: 1-0-DBNull

      You can't. A boolean column can hold one of exactly *two* values, true or
      false. If you need a null value, use a numeric field.

      --
      HTH,

      Kevin Spencer
      Microsoft MVP
      ..Net Developer
      You can lead a fish to a bicycle,
      but it takes a very long time,
      and the bicycle has to *want* to change.

      "Brenny" <brenny.brenny@ yahoo.com> wrote in message
      news:%23jFpSN6E GHA.3920@TK2MSF TNGP09.phx.gbl. ..[color=blue]
      > Hi,
      >
      > I'm using access database and a table has a boolean column.
      > I want to hold 1,0 and DBNull values in this column.
      > But I cannot DBNull value, how can I hold DBNull value in the access
      > database in boolean column?
      >[/color]


      Comment

      • Nicholas Paldino [.NET/C# MVP]

        #4
        Re: 1-0-DBNull

        Brenny,

        When creating the table, you should set the "required" property for the
        column to false. It should then accept null values.

        Hope this helps.


        --
        - Nicholas Paldino [.NET/C# MVP]
        - mvp@spam.guard. caspershouse.co m

        "Brenny" <brenny.brenny@ yahoo.com> wrote in message
        news:%23jFpSN6E GHA.3920@TK2MSF TNGP09.phx.gbl. ..[color=blue]
        > Hi,
        >
        > I'm using access database and a table has a boolean column.
        > I want to hold 1,0 and DBNull values in this column.
        > But I cannot DBNull value, how can I hold DBNull value in the access
        > database in boolean column?
        >[/color]


        Comment

        Working...