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>
>------------------------
> 
> 
> 
> 
> 
>
>
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
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