Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1945
  • Last Modified:

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

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
ejcorbett123
Asked:
ejcorbett123
1 Solution
 
ejcorbett123Author Commented:
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
 
gregoryyoungCommented:
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
 
gregoryyoungCommented:
hope this is the same issue you are having, otherwise :-?

Greg
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
tovvenkiCommented:
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
 
ejcorbett123Author Commented:
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
 
dimakopCommented:
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
 
gregoryyoungCommented:
thats what the link above is saying dimakop ... look here http://support.microsoft.com/default.aspx?scid=kb;en-us;305333
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now