INSERT 失败,因为下列 SET 选项的设置不正确: 'ARITHABORT'
当你在SQL Server上试图更新一个索引视图引用的表时,你可能回收到如下有错误
INSERT 失败,因为下列 SET 选项的设置不正确: 'ARITHABORT'
你必须在TSQL前Set ARITHABORT ON,代码如下
ON
GO
INSERT INTO ta ..
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
在ADO中,你可以这样来写(VB代码)
"SET ARITHABORT ON"
如果以上你都觉得很麻烦或由于一些原因没法更改,你可以尝试修改SQL Server服务器选项
'yourdb','ARITHABORT','true'
还可以
DATABASE yourdb
SET ARITHABORT ON
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)