Added error code for SQL.