how do I trap a datasource error in a page. I have several different datasources in the same page but I want the page to still run even if one of the datasources is down. Just skip over that field.
you could surround your code with
<html>
....
<cftry>
<cfquery name .....>
</cfquery>
<cfcatch type="database">
<cfoutput>
sorry we are not able to process your request due to some db error...
</cfoutput>
<cfabort>
</cfcatch>
</cftry>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.