uhhh, why not just do a cflocation to the temppage.cfm? Or rethrow the error
on an Any and use cferror to catch the error information and email to you
and then cflocation them to the temppage.cfm?


Anthony Petruzzi
Webmaster
954-321-4703
[EMAIL PROTECTED]
http://www.sheriff.org


-----Original Message-----
From: Chris Norloff [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 30, 2002 9:45 AM
To: CF-Talk
Subject: Re: CFTRY/CFCATCH Database errors


Strange, seems okay to me.  We use this in CF 4.5 and it works okay catching
if the Oracle database (using native drivers) goes down.  

I'd still like more granularity, so if the db is actually down (as opposed
to merely erroring) I can put up a notice.

If I were you, I'd break down what you have and see what's causing the
problem. I'd remove the javascript and just go to an ordinary CF page and
see if that's the problem.

good luck,
Chris Norloff



---------- Original Message ----------------------------------
from: "Bosky, Dave" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
date: Thu, 23 May 2002 16:17:27 -0400

>If I've got a query and for some odd reason the database server goes down,
>of course my query will fail.
>How can I catch the error due to the server being down and display a
>static/temp page instead?
>My code is below and it appears to be correct but it will not catch the
>error and redirect.
> 
>Any ideas...
> 
>Thanks,
>Dave
>-------------------------
><cftry>
><cfquery name="x" datasource ="x">
>blah blah
></cfquery>
><cfcatch type="database">
>            <script language="JavaScript">
>            alert ("Database Server is down! Please click OK to
continue.");
>            self.location="TempPage.cfm";
>            </script>
></cfcatch>
><cfcatch type="any">
><script language="JavaScript">
>            alert ("Database Server is down! Please click OK to
continue.");
>            self.location="TempPage.cfm";
></script>
></cfcatch>
></cftry>
>------------------------
> 
> 
> 
> 
> 
>
>

______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to