Solved

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

Posted on 2004-05-02
7
1,930 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Check only one toolstripmenu item 12 63
SSIS - Using VB.NET to parse XML file 11 43
VB Catch Statement in Event Viewer. 2 20
EMAIL RANGES BASED ON CURRENT TIME 12 41
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

710 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