adding SQL error messages