Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Unexpected Exception.

Reply
Thread Tools

Unexpected Exception.

 
 
Devin
Guest
Posts: n/a
 
      10-31-2008
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

 
Reply With Quote
 
 
 
 
Devin
Guest
Posts: n/a
 
      10-31-2008
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
 
Reply With Quote
 
 
 
 
Bob Barrows
Guest
Posts: n/a
 
      10-31-2008
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


 
Reply With Quote
 
Bob Barrows
Guest
Posts: n/a
 
      10-31-2008
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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unexpected error when trying to create a network bridge in Windows =?Utf-8?B?Q3JhaWc=?= Wireless Networking 0 11-03-2005 10:17 AM
Unexpected Password Needed When Attempting to Access My Other Comp =?Utf-8?B?RGVubmlzIE4u?= Wireless Networking 0 05-26-2005 07:36 PM
Unexpected Shutdown Myrt Webb Wireless Networking 3 11-10-2004 02:02 AM
Re: unexpected results Scott Lander Perl 0 07-07-2003 02:28 PM
fatal error CS0007: Unexpected common language runtime initialization error -- Polo Lee ASP .Net 0 07-07-2003 01:24 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57