Connecting Tech Pros Worldwide Help | Site Map

Unexpected Exception.

  #1  
Old October 31st, 2008, 03:45 PM
Devin
Guest
 
Posts: n/a
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("category") 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

  #2  
Old October 31st, 2008, 04:05 PM
Devin
Guest
 
Posts: n/a

re: Unexpected Exception.


On Oct 31, 10:38*am, Devin <devin.corm...@gmail.comwrote:
Quote:
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("category") 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 :)
  #3  
Old October 31st, 2008, 04:35 PM
Bob Barrows
Guest
 
Posts: n/a

re: Unexpected Exception.


Devin wrote:
Quote:
On Oct 31, 10:38 am, Devin <devin.corm...@gmail.comwrote:
Quote:
>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("category") 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


  #4  
Old October 31st, 2008, 04:35 PM
Bob Barrows
Guest
 
Posts: n/a

re: Unexpected Exception.


Devin wrote:
Quote:
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


Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
unexpected exception handler George2 answers 14 January 18th, 2008 07:05 AM
"error CS1577: Assembly generation failed -- Unexpected exception processing attribute -- System.ArgumentException: Invalid directory on URL." answers 5 July 5th, 2006 08:20 PM
unexpected exception Teddy answers 3 July 23rd, 2005 05:47 AM
"error CS1577: Assembly generation failed -- Unexpected exception processing attribute -- System.ArgumentException: Invalid directory on URL." answers 4 July 21st, 2005 11:17 AM
An unexpected exception has been detected in native code outside the VM commosoft answers 0 July 17th, 2005 10:44 PM