Do not show errors including database error to users in D7
You should be able to add the following to your settings.php to hide all errors (It will mean the admin screen you mentioned will no longer be used so any changes to this setting will need to be done via settings.php

$conf['error_level'] = ERROR_REPORTING_HIDE;