Check for SQL-Errors