Solved

INSERT failed because the following SET options have incorrect settings: 'ARITHABORT'.

Posted on 2004-05-02
7
1,907 Views
Last Modified: 2012-05-04
Full error message received:

Run-time exception thrown : System.Data.SqlClient.SqlException - INSERT failed because the following SET options have incorrect settings: 'ARITHABORT'.

The error occurs when calling a SQL Server 2000 stored procedure in a VB.NET class library through MS Application Blocks. Other libraries in the same project that make the same call do not fail. The stored procedure takes a parameter list and returns a scalar value.
0
Comment
Question by:ejcorbett123
7 Comments
 

Author Comment

by:ejcorbett123
ID: 10974872
Also, the stored proc shows up in a SQL trace but does not commit to the database. Executing the SQL trace text in the query analyzer works fine.
0
 
LVL 37

Accepted Solution

by:
gregoryyoung earned 500 total points
ID: 10974942
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_set-set_5tys.asp

a divide by 0 occurred during your operation.

I have seen this before when trying to do an update on a table referenced in an indexed view

http://support.microsoft.com/default.aspx?scid=kb;en-us;305333
0
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 10974945
hope this is the same issue you are having, otherwise :-?

Greg
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 21

Expert Comment

by:tovvenki
ID: 10975049
Hi,
                 are you doing any computation in any fields because when an INSERT, DELETE or UPDATE statement encounters an arithmetic error (overflow, divide-by-zero, or a domain error) during expression evaluation when SET ARITHABORT is OFF, SQL Server will try to inserts or updates a NULL value and if the target column is not nullable, then the insert or update action would fail and an error will be thrown.

regards,
venki


0
 

Author Comment

by:ejcorbett123
ID: 10975072
Thanks for the feedback. The problem was with a schema bound view that was automatically created after I ran the index tuning wizard. I'm not sure why the proc still worked from the query analyzer but I'll figure that out some other time... Life is good again!
0
 

Expert Comment

by:dimakop
ID: 11220854
Hi I can't update any tables because of the error above and I have no idea how to implement the code on Microsoft. MY fields aren't doing any computation at all.
0
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 11222382
thats what the link above is saying dimakop ... look here http://support.microsoft.com/default.aspx?scid=kb;en-us;305333
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Many of my clients call in with monstrous Gmail overloading issues with Outlook. A quick tip is to turn off the All Mail and Important folders from synching. Here is a quick video I made to show you how to turn off these and other folders in Gmail s…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now