Msg 6522, Level 16 warning during execution of clr stored procedure

后端 未结 2 1143
梦谈多话
梦谈多话 2021-01-24 09:56

I would like to create SQL Server CLR stored procedure for inserting some rows in a table in SQL Server 2012.

Here is my c# code:

using System;
using Sys         


        
2条回答
  •  星月不相逢
    2021-01-24 10:45

    Inside your SQL CLR C# code, you should not build a connection with explicit server, database name and credentials -instead, use the "context" connnectino:

    using (SqlConnection conn = new SqlConnection("context connection=true"))
    {
        // do your stuff here...
    }    
    

提交回复
热议问题