Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

Yes/No Field Problem

Discussion in 'Information Technology' started by Earl Partridge, Nov 12, 2005.

  1. Earl Partridge

    Earl Partridge
    Expand Collapse
    Guest

    Access 2000
    I added (actually replaced a text field) with a Yes/No type, setting Format
    to True/False. This put a box in that field which can contain a check mark.
    I try to update this live on the net with an .asp page and get Data Type
    Mismatch. Should the True/False be something different?
    Earl
     
  2. Loading...


  3. Brendan Reynolds

    Brendan Reynolds
    Expand Collapse
    Guest

    -1 for true/yes/checked, 0 for false/no/unchecked.

    --
    Brendan Reynolds

    "Earl Partridge" <earlpNG@pearnet.com> wrote in message
    news:Mt6df.7746$m81.5531@newsread1.news.atl.earthlink.net...
    > Access 2000
    > I added (actually replaced a text field) with a Yes/No type, setting
    > Format
    > to True/False. This put a box in that field which can contain a check
    > mark.
    > I try to update this live on the net with an .asp page and get Data Type
    > Mismatch. Should the True/False be something different?
    > Earl
    >
    >
     
  4. SusanV

    SusanV
    Expand Collapse
    Guest

    You shouldn't need formatting at all - it's really just a Boolean field
    type. My guess would be that the field on the ASP page is not set to
    Boolean, and is trying to assign a text value to the field.

    --
    hth,
    SusanV

    "Earl Partridge" <earlpNG@pearnet.com> wrote in message
    news:Mt6df.7746$m81.5531@newsread1.news.atl.earthlink.net...
    > Access 2000
    > I added (actually replaced a text field) with a Yes/No type, setting
    > Format
    > to True/False. This put a box in that field which can contain a check
    > mark.
    > I try to update this live on the net with an .asp page and get Data Type
    > Mismatch. Should the True/False be something different?
    > Earl
    >
    >
     
  5. Earl Partridge

    Earl Partridge
    Expand Collapse
    Guest

    When the informtion for that field is displayed, it shows either "True" or
    "False". With your help, I have determined that when I update that record
    that field must contain either -1 or 0. Should I be able to change some
    setting that will show -1 or 0 instead of True or False?
    Earl

    "Brendan Reynolds" <brenreyn@discussions.microsoft.com> wrote in message
    news:O2DUTpv5FHA.3388@TK2MSFTNGP11.phx.gbl...
    > -1 for true/yes/checked, 0 for false/no/unchecked.
    >
    > --
    > Brendan Reynolds
    >
    > "Earl Partridge" <earlpNG@pearnet.com> wrote in message
    > news:Mt6df.7746$m81.5531@newsread1.news.atl.earthlink.net...
    >> Access 2000
    >> I added (actually replaced a text field) with a Yes/No type, setting
    >> Format
    >> to True/False. This put a box in that field which can contain a check
    >> mark.
    >> I try to update this live on the net with an .asp page and get Data Type
    >> Mismatch. Should the True/False be something different?
    >> Earl
    >>
    >>

    >
    >
     
  6. Douglas J. Steele

    Douglas J. Steele
    Expand Collapse
    Guest

    No change should be necessary: what's actually stored is -1 or 0, regardless
    of the format.

    Do you know exactly how the ASP page is trying to update the tables: might
    it be trying to use True or False in quotes, making it text, rather than the
    literals True or False?

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no e-mails, please!)



    "Earl Partridge" <earlpNG@pearnet.com> wrote in message
    news:wp9df.8037$AS6.3785@newsread3.news.atl.earthlink.net...
    > When the informtion for that field is displayed, it shows either "True" or
    > "False". With your help, I have determined that when I update that record
    > that field must contain either -1 or 0. Should I be able to change some
    > setting that will show -1 or 0 instead of True or False?
    > Earl
    >
    > "Brendan Reynolds" <brenreyn@discussions.microsoft.com> wrote in message
    > news:O2DUTpv5FHA.3388@TK2MSFTNGP11.phx.gbl...
    >> -1 for true/yes/checked, 0 for false/no/unchecked.
    >>
    >> --
    >> Brendan Reynolds
    >>
    >> "Earl Partridge" <earlpNG@pearnet.com> wrote in message
    >> news:Mt6df.7746$m81.5531@newsread1.news.atl.earthlink.net...
    >>> Access 2000
    >>> I added (actually replaced a text field) with a Yes/No type, setting
    >>> Format
    >>> to True/False. This put a box in that field which can contain a check
    >>> mark.
    >>> I try to update this live on the net with an .asp page and get Data Type
    >>> Mismatch. Should the True/False be something different?
    >>> Earl
    >>>
    >>>

    >>
    >>

    >
    >
     
  7. Earl Partridge

    Earl Partridge
    Expand Collapse
    Guest

    When viewed, that field displays either "True" or "False". If my update
    does not
    affect that field then I would not change it, thus updating would attempt to
    write
    the value as it was read/displayed. I guess the easiest solution is that I
    will need
    to change them to either -1 or 0 before updating? Or, perhaps change them
    to
    either "-1" or "0" when reading from the database and displaying?
    Earl

    "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
    news:OiiRznx5FHA.3432@TK2MSFTNGP10.phx.gbl...
    > No change should be necessary: what's actually stored is -1 or 0,
    > regardless of the format.
    >
    > Do you know exactly how the ASP page is trying to update the tables: might
    > it be trying to use True or False in quotes, making it text, rather than
    > the literals True or False?
    >
    > --
    > Doug Steele, Microsoft Access MVP
    > http://I.Am/DougSteele
    > (no e-mails, please!)
    >
    >
    >
    > "Earl Partridge" <earlpNG@pearnet.com> wrote in message
    > news:wp9df.8037$AS6.3785@newsread3.news.atl.earthlink.net...
    >> When the informtion for that field is displayed, it shows either "True"
    >> or
    >> "False". With your help, I have determined that when I update that
    >> record
    >> that field must contain either -1 or 0. Should I be able to change some
    >> setting that will show -1 or 0 instead of True or False?
    >> Earl
    >>
    >> "Brendan Reynolds" <brenreyn@discussions.microsoft.com> wrote in message
    >> news:O2DUTpv5FHA.3388@TK2MSFTNGP11.phx.gbl...
    >>> -1 for true/yes/checked, 0 for false/no/unchecked.
    >>>
    >>> --
    >>> Brendan Reynolds
    >>>
    >>> "Earl Partridge" <earlpNG@pearnet.com> wrote in message
    >>> news:Mt6df.7746$m81.5531@newsread1.news.atl.earthlink.net...
    >>>> Access 2000
    >>>> I added (actually replaced a text field) with a Yes/No type, setting
    >>>> Format
    >>>> to True/False. This put a box in that field which can contain a check
    >>>> mark.
    >>>> I try to update this live on the net with an .asp page and get Data
    >>>> Type
    >>>> Mismatch. Should the True/False be something different?
    >>>> Earl
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
     
  8. Earl Partridge

    Earl Partridge
    Expand Collapse
    Guest

    It took a while but it finally dawned on me... I was enclosing the "True" or
    "False" within single quotes. The answers here helped me to realize that.
    Thanks everyone.
    Earl


    "Earl Partridge" <earlpNG@pearnet.com> wrote in message
    news:liadf.7311$2y.1001@newsread2.news.atl.earthlink.net...
    > When viewed, that field displays either "True" or "False". If my update
    > does not
    > affect that field then I would not change it, thus updating would attempt
    > to write
    > the value as it was read/displayed. I guess the easiest solution is that
    > I will need
    > to change them to either -1 or 0 before updating? Or, perhaps change them
    > to
    > either "-1" or "0" when reading from the database and displaying?
    > Earl
    >
    > "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
    > news:OiiRznx5FHA.3432@TK2MSFTNGP10.phx.gbl...
    >> No change should be necessary: what's actually stored is -1 or 0,
    >> regardless of the format.
    >>
    >> Do you know exactly how the ASP page is trying to update the tables:
    >> might it be trying to use True or False in quotes, making it text, rather
    >> than the literals True or False?
    >>
    >> --
    >> Doug Steele, Microsoft Access MVP
    >> http://I.Am/DougSteele
    >> (no e-mails, please!)
    >>
    >>
    >>
    >> "Earl Partridge" <earlpNG@pearnet.com> wrote in message
    >> news:wp9df.8037$AS6.3785@newsread3.news.atl.earthlink.net...
    >>> When the informtion for that field is displayed, it shows either "True"
    >>> or
    >>> "False". With your help, I have determined that when I update that
    >>> record
    >>> that field must contain either -1 or 0. Should I be able to change some
    >>> setting that will show -1 or 0 instead of True or False?
    >>> Earl
    >>>
    >>> "Brendan Reynolds" <brenreyn@discussions.microsoft.com> wrote in message
    >>> news:O2DUTpv5FHA.3388@TK2MSFTNGP11.phx.gbl...
    >>>> -1 for true/yes/checked, 0 for false/no/unchecked.
    >>>>
    >>>> --
    >>>> Brendan Reynolds
    >>>>
    >>>> "Earl Partridge" <earlpNG@pearnet.com> wrote in message
    >>>> news:Mt6df.7746$m81.5531@newsread1.news.atl.earthlink.net...
    >>>>> Access 2000
    >>>>> I added (actually replaced a text field) with a Yes/No type, setting
    >>>>> Format
    >>>>> to True/False. This put a box in that field which can contain a check
    >>>>> mark.
    >>>>> I try to update this live on the net with an .asp page and get Data
    >>>>> Type
    >>>>> Mismatch. Should the True/False be something different?
    >>>>> Earl
    >>>>>
    >>>>>
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page