Solved

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

Posted on 2004-05-02
7
1,901 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

706 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

17 Experts available now in Live!

Get 1:1 Help Now