Migrating Access Program to ASP have problems with Yes/No Field

Discussion in 'ASP General' started by A P, Sep 24, 2004.

  1. A P

    A P Guest

    I am planning to migrate my exisiting MS Access program that uses yes/no
    fields (checkbox). Can ASP identifies checkbox field of ms access? I am
    planning to use the same database and use msacess for report generation and
    web browser for encoding to the database.

    Hope you could help me.

    Me
    A P, Sep 24, 2004
    #1
    1. Advertising

  2. A P

    David Morgan Guest

    The answer is yes.

    When testing for 'yes' you would say

    WHERE Field = 1

    Or

    WHERE Field = 'True'


    "A P" <> wrote in message
    news:%...
    > I am planning to migrate my exisiting MS Access program that uses yes/no
    > fields (checkbox). Can ASP identifies checkbox field of ms access? I am
    > planning to use the same database and use msacess for report generation

    and
    > web browser for encoding to the database.
    >
    > Hope you could help me.
    >
    > Me
    >
    >
    David Morgan, Sep 24, 2004
    #2
    1. Advertising

  3. A P

    A P Guest

    I tried to access certain field with Yes/No data type from MS Access but IE
    gave me an error message:

    Microsoft JET Database Engine error '80040e07'
    Data type mismatch in criteria expression.

    What do I need to do?

    "David Morgan" <> wrote in message
    news:...
    > The answer is yes.
    >
    > When testing for 'yes' you would say
    >
    > WHERE Field = 1
    >
    > Or
    >
    > WHERE Field = 'True'
    >
    >
    > "A P" <> wrote in message
    > news:%...
    > > I am planning to migrate my exisiting MS Access program that uses yes/no
    > > fields (checkbox). Can ASP identifies checkbox field of ms access? I am
    > > planning to use the same database and use msacess for report generation

    > and
    > > web browser for encoding to the database.
    > >
    > > Hope you could help me.
    > >
    > > Me
    > >
    > >

    >
    >
    A P, Sep 27, 2004
    #3
  4. It's hard to say without seeing what your query is, i.e.

    Response.write sqlString
    response.end

    Try using:

    where fieldname=true

    instead of
    where fieldname='true'
    if that's what you were using.

    Ray at home

    "A P" <> wrote in message
    news:...
    >I tried to access certain field with Yes/No data type from MS Access but IE
    > gave me an error message:
    >
    > Microsoft JET Database Engine error '80040e07'
    > Data type mismatch in criteria expression.
    >
    > What do I need to do?
    >
    > "David Morgan" <> wrote in message
    > news:...
    >> The answer is yes.
    >>
    >> When testing for 'yes' you would say
    >>
    >> WHERE Field = 1
    >>
    >> Or
    >>
    >> WHERE Field = 'True'
    >>
    >>
    >> "A P" <> wrote in message
    >> news:%...
    >> > I am planning to migrate my exisiting MS Access program that uses
    >> > yes/no
    >> > fields (checkbox). Can ASP identifies checkbox field of ms access? I am
    >> > planning to use the same database and use msacess for report generation

    >> and
    >> > web browser for encoding to the database.
    >> >
    >> > Hope you could help me.
    >> >
    >> > Me
    >> >
    >> >

    >>
    >>

    >
    >
    Ray Costanzo [MVP], Sep 27, 2004
    #4
  5. A P

    A P Guest

    The error was gone but I think the query cannot find what I'm looking for.

    SELECT * FROM tblform WHERE Served = True

    Note that Served field is a Yes/No MS Access Data Type.

    Me


    "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
    message news:...
    > It's hard to say without seeing what your query is, i.e.
    >
    > Response.write sqlString
    > response.end
    >
    > Try using:
    >
    > where fieldname=true
    >
    > instead of
    > where fieldname='true'
    > if that's what you were using.
    >
    > Ray at home
    >
    > "A P" <> wrote in message
    > news:...
    > >I tried to access certain field with Yes/No data type from MS Access but

    IE
    > > gave me an error message:
    > >
    > > Microsoft JET Database Engine error '80040e07'
    > > Data type mismatch in criteria expression.
    > >
    > > What do I need to do?
    > >
    > > "David Morgan" <> wrote in message
    > > news:...
    > >> The answer is yes.
    > >>
    > >> When testing for 'yes' you would say
    > >>
    > >> WHERE Field = 1
    > >>
    > >> Or
    > >>
    > >> WHERE Field = 'True'
    > >>
    > >>
    > >> "A P" <> wrote in message
    > >> news:%...
    > >> > I am planning to migrate my exisiting MS Access program that uses
    > >> > yes/no
    > >> > fields (checkbox). Can ASP identifies checkbox field of ms access? I

    am
    > >> > planning to use the same database and use msacess for report

    generation
    > >> and
    > >> > web browser for encoding to the database.
    > >> >
    > >> > Hope you could help me.
    > >> >
    > >> > Me
    > >> >
    > >> >
    > >>
    > >>

    > >
    > >

    >
    >
    A P, Sep 27, 2004
    #5
  6. You need to use the numeric representations of true/false:
    SELECT * FROM tblform WHERE Served = -1

    Bob Barrows

    A P wrote:
    > The error was gone but I think the query cannot find what I'm looking
    > for.
    >
    > SELECT * FROM tblform WHERE Served = True
    >
    > Note that Served field is a Yes/No MS Access Data Type.
    >
    > Me
    >
    >
    > "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote
    > in message news:...
    >> It's hard to say without seeing what your query is, i.e.
    >>
    >> Response.write sqlString
    >> response.end
    >>
    >> Try using:
    >>
    >> where fieldname=true
    >>
    >> instead of
    >> where fieldname='true'
    >> if that's what you were using.
    >>
    >> Ray at home
    >>
    >> "A P" <> wrote in message
    >> news:...
    >>> I tried to access certain field with Yes/No data type from MS
    >>> Access but IE gave me an error message:
    >>>
    >>> Microsoft JET Database Engine error '80040e07'
    >>> Data type mismatch in criteria expression.
    >>>
    >>> What do I need to do?
    >>>
    >>> "David Morgan" <> wrote in message
    >>> news:...
    >>>> The answer is yes.
    >>>>
    >>>> When testing for 'yes' you would say
    >>>>
    >>>> WHERE Field = 1
    >>>>
    >>>> Or
    >>>>
    >>>> WHERE Field = 'True'
    >>>>
    >>>>
    >>>> "A P" <> wrote in message
    >>>> news:%...
    >>>>> I am planning to migrate my exisiting MS Access program that uses
    >>>>> yes/no
    >>>>> fields (checkbox). Can ASP identifies checkbox field of ms
    >>>>> access? I am planning to use the same database and use msacess
    >>>>> for report generation and web browser for encoding to the
    >>>>> database.
    >>>>>
    >>>>> Hope you could help me.
    >>>>>
    >>>>> Me


    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
    Bob Barrows [MVP], Sep 27, 2004
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Harry Devine
    Replies:
    1
    Views:
    4,339
  2. teo
    Replies:
    3
    Views:
    534
  3. David Thielen

    data field - change true/false to Yes/No

    David Thielen, Dec 14, 2006, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    287
    David Thielen
    Dec 19, 2006
  4. middletree

    how to insert data into yes/no field

    middletree, Nov 7, 2003, in forum: ASP General
    Replies:
    6
    Views:
    132
    middletree
    Nov 7, 2003
  5. Jamie Herre
    Replies:
    1
    Views:
    196
    why the lucky stiff
    Jan 7, 2005
Loading...

Share This Page