Skip to main content
Inspiring
April 20, 2006
Question

Error Executing Database

  • April 20, 2006
  • 2 replies
  • 277 views


I am familiar with the 400 and 500 custom error page setup option in the control panels of many shared server hosts, but I have other error pages that come up infrequently that I'd like to mask.

Every now and again, I'll get a situation where one of my pages comes up "Error Executing Database Query" and my code, Datasource, etc. are all listed right there.

How can I prevent this (besides fixing the coding problem)? Is there a structural method I'm not using, or a custom error page I don't know of? I'm a low level CFmx coder, so education in security would be beneficial

Thanks,
Stephen
Tallahassee, FL

    This topic has been closed for replies.

    2 replies

    Participating Frequently
    April 20, 2006
    You can create your own custom error handlers displaying only desired content and doing other things like e-mailing or logging into a error log database (where you can record the stuff that YOU want to see). They can be enabled via the CFERROR tag, presumably in each application.cfm, or an easier approach is the Site Wide Error Handler setting in the Administrator\Settings if you can use the same logic for all. Be aware that debugging a new one can be very tedious, strange happenings when the handler itself has an error. You may have to resort to displays and cfaborts. You can also find limited info in the application.log. As I recall (and it is probably version dependent) an error in the error handler reverts to displaying the original error in the old format. Just for jolly's to get you started,I've attached mine, for MX 7.01 only, with a database and conditional e-mail.
    April 20, 2006