title: Getting Error as INSERT failed because the following SET options have incorrect settings
body: <p>My code inserts data which is passed as a XML from C# code behind which is working fine locally into SQL Server 2008  but on a remote instance of SQL Server 2005 it's throwing the following exception. Please help.</p>
  
  <blockquote>
    <p>CREATE PROCEDURE SqAnswersInsert @AnswerID   INT OUTPUT,<br>
                                     @ClientID   INT=NULL,<br>
                                     @VGBID      INT=NULL,<br>
                                     @CreatedOn  DATETIME=NULL,<br>
                                     @XmlOptions XML=NULL         AS           BEGIN        </p>
  
  <pre><code>  SET ARITHABORT ON            
    INSERT SqAnswers        
           (ClientID,        
            VGBID,        
            [CreatedOn])        
    VALUES (@ClientID,        
            @VGBID,        
            @CreatedOn)        
  
    SET @AnswerID=Scope_identity()        
  
    INSERT INTO SqAnswerOptions        
                (AnswerID,        
                 QuestionOptionID)        
  
    SELECT @AnswerID,A.B.value('QuestionOptionID[1]', 'INT') AS QuestionOptionID        
    --A.B.value('QuestionOptions/QuestionOptionID', 'INT') as QuestionOptionID          
    FROM   @XmlOptions.nodes('/QuestionOptions/Option') A(B)        
    SET ARITHABORT OFF               END
  </code></pre>
    
    <p>INSERT failed because the following SET options have incorrect settings: 'ARITHABORT'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or filtered indexes and/or query notifications and/or XML data type methods and/or spatial index operations.</p>
  </blockquote>