WoW Gold - Find jobs - Debt Consolidation - Internet Advertising - Submit article

PDA

View Full Version : ColdFusion and (MS)SQL - catching db unavailability errors


strivinglife
Jun 1st 2006, 11:07 am
I'm looking for a fairly non-disruptive way to catch both SQL db unavailability and errors, in the style of PHP-MySQL.

With PHP, if you can't connect to a db, you can abort further calls within the function and output some error text. (mysql_connect() or die())

With ColdFusion, I've only seen a way to implement a complete page substitution, unless one uses cfcatch and cftry. Is this the only method?


What I'd like to do: Check to see if ColdFusion can connect to MSSQL. If it can't, display a message within the template that the service is temporarily unavailable. This is also a unique error to this service - we don't want this to be our standard error.

Do I have a PHP like option - or, what are my options?

Thanks all,

~J

ccoonen
Aug 12th 2006, 12:46 pm
catch and try i think is the only option my friend (but i haven't dabbled really with the new cf 7 options)

strivinglife
Aug 13th 2006, 10:50 am
Well, that's unfortunate ...