Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 SQL Queries - ARTIABORT ON

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-01-01 : 23:24:37
Bhama writes "I have 2 table without any computed columns. Both of them have a tinyint field 'LinkOn'. In a stored procedure I set this field in both tables to '1' based on certain conditions and both updates are in a Transaction.

I set two option 1. Set XACT_ABORT ON 2.SET NOCOUNT ON in my store procedure.

But when I ran the stored procedure I got the error message
"UPDATE failed because the following SET options have incorrect settings: 'ARITHABORT'."

Even after reading the Books Online I still couldn't figure out why I get this. I don't use any arithmetic operations in my query and both tables don't have any computed columns.

The thing is when I added 'SET ARITHABORT ON' to my stored procedure it worked fine and I no longer get this error message. But I have no idea why I should use this statement in the first place."

nr
SQLTeam MVY

12543 Posts

Posted - 2002-01-02 : 09:46:35
Do you have any triggers?

What happpens if you set arithabort off?
What happens if you do the updates without a transaction?
What happens if you set arithignore on?
What happens if you just update a single row to 1?


==========================================
Cursors are useful if you don't know sql.
Beer is not cold and it isn't fizzy.
Go to Top of Page

Bhama
Starting Member

1 Post

Posted - 2002-01-02 : 17:34:22
No. I dont have any triggers. Today I cannot run the any update on any table since I get the ARITHABORT error on almost all tables. I havent changed the settings and these queries and stored procedures were working fine before.
So I went in and in Properties -> Connections -> checked the ARITHABORT and all started working fine.
The same stored procedures and queries are there in other servers and are working fine without the setting this option.
I have no idea what the problem is?

Go to Top of Page
   

- Advertisement -