Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   Unexpected Exception. (http://www.velocityreviews.com/forums/t804540-unexpected-exception.html)

Devin 10-31-2008 02:38 PM

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


Devin 10-31-2008 02:55 PM

Re: Unexpected Exception.
 
On Oct 31, 10:38*am, Devin <devin.corm...@gmail.com> wrote:
> 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 :)

Bob Barrows 10-31-2008 03:27 PM

Re: Unexpected Exception.
 
Devin wrote:
> On Oct 31, 10:38 am, Devin <devin.corm...@gmail.com> wrote:
>> 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



Bob Barrows 10-31-2008 03:28 PM

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




All times are GMT. The time now is 02:29 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.