• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1949
  • 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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

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