Unexpected Exception.

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

    Unexpected Exception.

    Hi,
    I'm getting an exception error on this line:

    do while not rs.eof and ucase(rs.fields ("category") ) =
    ucase(holdLast)


    This error occurs on the last record in the table (mdb). I deleted
    the last few records from the table to see if it was something with
    the record. The same thing occured.


    I also response.write the values of rs.fields("cate gory") and
    holdLast and they output the values I would expect.


    Am I going nuts?

    I don't want to post my enter page, but if the error could really go
    beyond this line then please let me know.

    Thanks for any input.


    DC

  • Devin

    #2
    Re: Unexpected Exception.

    On Oct 31, 10:38 am, Devin <devin.corm...@ gmail.comwrote:
    Hi,
    I'm getting an exception error on this line:
    >
    do while not rs.eof and ucase(rs.fields ("category") ) =
    ucase(holdLast)
    >
    This error occurs on the last record in the table (mdb).  I deleted
    the last few records from the table to see if it was something with
    the record.  The same thing occured.
    >
    I also response.write the values of  rs.fields("cate gory") and
    holdLast and they output the values I would expect.
    >
    Am I going nuts?
    >
    I don't want to post my enter page, but if the error could really go
    beyond this line then please let me know.
    >
    Thanks for any input.
    >
    DC
    It was unrelated. This post can be deleted :)

    Comment

    • Bob Barrows

      #3
      Re: Unexpected Exception.

      Devin wrote:
      On Oct 31, 10:38 am, Devin <devin.corm...@ gmail.comwrote:
      >Hi,
      >I'm getting an exception error on this line:
      >>
      >do while not rs.eof and ucase(rs.fields ("category") ) =
      >ucase(holdLast )
      Both expressions are evaluated. If EOF is true, then
      rs.fields("cate gory") will raise an error.
      Change it to:
      do while not rs.eof
      if ucase(rs.fields ("category") ) =ucase(holdLast ) then
      end if
      rs.movenext
      loop




      --
      HTH,
      Bob Barrows


      Comment

      • Bob Barrows

        #4
        Re: Unexpected Exception.

        Devin wrote:
        Hi,
        I'm getting an exception error on this line:
        >
        do while not rs.eof and ucase(rs.fields ("category") ) =
        ucase(holdLast)
        >
        Oops, I should have written:

        do while not rs.eof
        if ucase(rs.fields ("category") ) =ucase(holdLast ) then
        ...
        else
        break
        end if
        rs.movenext
        loop


        --
        HTH,
        Bob Barrows


        Comment

        Working...