Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: customizing an error message


Message #1 by "Jenny Yan" <jenjenyan@h...> on Tue, 3 Sep 2002 00:27:05

Can i customize the following error message so that it is understandable 
to visitors in case they encounter this message??

ADODB.Recordset error '800a0bcd' 

Either BOF or EOF is True, or the current record has been deleted. 
Requested operation requires a current record. 


If so, how?


Thank you in advance,

Jen
Message #2 by "Rob Parkhouse" <rparkhouse@o...> on Tue, 3 Sep 2002 01:09:02
> 

> Can i customize the following error message so that it is understandable 
t> o visitors in case they encounter this message??

> ADODB.Recordset error '800a0bcd' 

> Either BOF or EOF is True, or the current record has been deleted. 
R> equested operation requires a current record. 

> 
I> f so, how?

> 
T> hank you in advance,

> Jen


It would be better for the ASP to trap the condition before trying to 
process the recordset. After you execute some SQL to create a recordset 
you should test for this condition 

  If rs.BOF Then
     output your own message
  Else
     process the recordset
  End If

Regards Rob
Message #3 by "Darrell" <darrell@b...> on Tue, 3 Sep 2002 11:42:39 +0100
Hi Jen

Rob is right it is always best to try and trap all possible errors but you
can also change the default 500 error page so as not to scare your
clients/users.  In IIS right click and select properties for  the website,
select custom errors and scroll down till you find 500.  Select it and click
edit properties and then select url.  Type in the location (if the page is
in the websites root directory you will simply need to name it something
like /500.asp).

You can also add a cdo script to your custom page to notify you of the error
and the page where it occurred.

Cheers
Darrell

-----Original Message-----
From: Rob Parkhouse [mailto:rparkhouse@o...]
Sent: 03 September 2002 01:09
To: Access ASP
Subject: [access_asp] Re: customizing an error message


>

> Can i customize the following error message so that it is understandable
t> o visitors in case they encounter this message??

> ADODB.Recordset error '800a0bcd'

> Either BOF or EOF is True, or the current record has been deleted.
R> equested operation requires a current record.

>
I> f so, how?

>
T> hank you in advance,

> Jen


It would be better for the ASP to trap the condition before trying to
process the recordset. After you execute some SQL to create a recordset
you should test for this condition

  If rs.BOF Then
     output your own message
  Else
     process the recordset
  End If

Regards Rob


  Return to Index