Hi ColtsFanMN,
By my search, I don't find any way to change default SQL connection object setting, so you need to
SET
ansi_nulls off; manually.
Public Shared Sub OpenAndSetArithAbort(MyConnection As SqlConnection)
Using _Command As SqlCommand = MyConnection.CreateCommand()
_Command.CommandType = CommandType.Text
_Command.CommandText = "SET ANSI_NULLS OFF;"
MyConnection.Open()
_Command.ExecuteNonQuery()
End Using
Return
End Sub
Here is the same thread that you can refer to:
https://dba.stackexchange.com/questions/2500/make-sqlclient-default-to-arithabort-on
Best Regards,
Cherry
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to
MSDN Support, feel free to contact MSDNFSF@microsoft.com.