Added Exception for SQL Command

added exception for when SQL command fails