When you try to update a table referenced by the index view on SQL Server, you may retrieve the following errors:
Insert failed because the following set options are incorrectly set: 'arithabort'
When you create or operate an index on a calculated column or index view, set ansi_nulls must also be on. If set ansi_nulls is off, the CREATE, update, insert, and delete statements on the table with an index on the calculation column or index view will fail. SQL Server Returns An error listing all set options that violate the required values. In addition, if set ansi_nulls is off when the SELECT statement is executed, SQL Server ignores the index value on the calculated column or view and parses the selection, it is like no such index on a table or view.
Solution:
1. You must set arithabort on before tsql,CodeAs follows:
Set arithabort on
Go
Insert into ta ..
2. In ADO, you can write (C # code) like this)
Myconnection. Execute ("set arithabort on ");
If you are in trouble or cannot change it for some reason, you can try to modify the SQL Server server option.
3. Exec sp_dboption 'yourdb', 'arithabort ', 'true'
Yes
4. Alter database yourdb
Set arithabort on