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

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

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

    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

    #2
    Re: Migrating Access Program to ASP have problems with Yes/No Field

    The answer is yes.

    When testing for 'yes' you would say

    WHERE Field = 1

    Or

    WHERE Field = 'True'


    "A P" <ap@textguru.ph > wrote in message
    news:%23Ju0DOfo EHA.536@TK2MSFT NGP11.phx.gbl.. .[color=blue]
    > 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[/color]
    and[color=blue]
    > web browser for encoding to the database.
    >
    > Hope you could help me.
    >
    > Me
    >
    >[/color]


    Comment

    • A P

      #3
      Re: Migrating Access Program to ASP have problems with Yes/No Field

      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" <david@davidmor gan.me.uk> wrote in message
      news:e4v79eioEH A.3728@TK2MSFTN GP09.phx.gbl...[color=blue]
      > The answer is yes.
      >
      > When testing for 'yes' you would say
      >
      > WHERE Field = 1
      >
      > Or
      >
      > WHERE Field = 'True'
      >
      >
      > "A P" <ap@textguru.ph > wrote in message
      > news:%23Ju0DOfo EHA.536@TK2MSFT NGP11.phx.gbl.. .[color=green]
      > > 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[/color]
      > and[color=green]
      > > web browser for encoding to the database.
      > >
      > > Hope you could help me.
      > >
      > > Me
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • Ray Costanzo [MVP]

        #4
        Re: Migrating Access Program to ASP have problems with Yes/No Field

        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" <ap@textguru.ph > wrote in message
        news:eKIerNFpEH A.2900@TK2MSFTN GP12.phx.gbl...[color=blue]
        >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" <david@davidmor gan.me.uk> wrote in message
        > news:e4v79eioEH A.3728@TK2MSFTN GP09.phx.gbl...[color=green]
        >> The answer is yes.
        >>
        >> When testing for 'yes' you would say
        >>
        >> WHERE Field = 1
        >>
        >> Or
        >>
        >> WHERE Field = 'True'
        >>
        >>
        >> "A P" <ap@textguru.ph > wrote in message
        >> news:%23Ju0DOfo EHA.536@TK2MSFT NGP11.phx.gbl.. .[color=darkred]
        >> > 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[/color]
        >> and[color=darkred]
        >> > web browser for encoding to the database.
        >> >
        >> > Hope you could help me.
        >> >
        >> > Me
        >> >
        >> >[/color]
        >>
        >>[/color]
        >
        >[/color]


        Comment

        • A P

          #5
          Re: Migrating Access Program to ASP have problems with Yes/No Field

          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:u9BJlaFpEH A.692@TK2MSFTNG P12.phx.gbl...[color=blue]
          > 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" <ap@textguru.ph > wrote in message
          > news:eKIerNFpEH A.2900@TK2MSFTN GP12.phx.gbl...[color=green]
          > >I tried to access certain field with Yes/No data type from MS Access but[/color][/color]
          IE[color=blue][color=green]
          > > 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" <david@davidmor gan.me.uk> wrote in message
          > > news:e4v79eioEH A.3728@TK2MSFTN GP09.phx.gbl...[color=darkred]
          > >> The answer is yes.
          > >>
          > >> When testing for 'yes' you would say
          > >>
          > >> WHERE Field = 1
          > >>
          > >> Or
          > >>
          > >> WHERE Field = 'True'
          > >>
          > >>
          > >> "A P" <ap@textguru.ph > wrote in message
          > >> news:%23Ju0DOfo EHA.536@TK2MSFT NGP11.phx.gbl.. .
          > >> > 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[/color][/color][/color]
          am[color=blue][color=green][color=darkred]
          > >> > planning to use the same database and use msacess for report[/color][/color][/color]
          generation[color=blue][color=green][color=darkred]
          > >> and
          > >> > web browser for encoding to the database.
          > >> >
          > >> > Hope you could help me.
          > >> >
          > >> > Me
          > >> >
          > >> >
          > >>
          > >>[/color]
          > >
          > >[/color]
          >
          >[/color]


          Comment

          • Bob Barrows [MVP]

            #6
            Re: Migrating Access Program to ASP have problems with Yes/No Field

            You need to use the numeric representations of true/false:
            SELECT * FROM tblform WHERE Served = -1

            Bob Barrows

            A P wrote:[color=blue]
            > 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:u9BJlaFpEH A.692@TK2MSFTNG P12.phx.gbl...[color=green]
            >> 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" <ap@textguru.ph > wrote in message
            >> news:eKIerNFpEH A.2900@TK2MSFTN GP12.phx.gbl...[color=darkred]
            >>> 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" <david@davidmor gan.me.uk> wrote in message
            >>> news:e4v79eioEH A.3728@TK2MSFTN GP09.phx.gbl...
            >>>> The answer is yes.
            >>>>
            >>>> When testing for 'yes' you would say
            >>>>
            >>>> WHERE Field = 1
            >>>>
            >>>> Or
            >>>>
            >>>> WHERE Field = 'True'
            >>>>
            >>>>
            >>>> "A P" <ap@textguru.ph > wrote in message
            >>>> news:%23Ju0DOfo EHA.536@TK2MSFT NGP11.phx.gbl.. .
            >>>>> 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[/color][/color][/color]

            --
            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"


            Comment

            Working...