c# sql2005 CLR 部署已失败 不知道什么原因
using System;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using Microsoft.SqlServer.Server;
public partial class StoredProcedures
{
[Microsoft.SqlServer.Server.SqlProcedure]
public static void sp_t1(SqlInt32 tid, SqlString tname)
{
// Put your code here
SqlConnection con = new SqlConnection("context connection=true");
SqlCommand com = new SqlCommand("insert into t1 values(@tid,@tname)", con);
SqlParameter par1 = new SqlParameter("@tid", tid);
SqlParameter par2 = new SqlParameter("@tname", tname);
con.Open();
com.Parameters.Add(par1);
com.Parameters.Add(par2);
int cnt = com.ExecuteNonQuery();
con.Close();
SqlContext.Pipe.Send(cnt.ToString());
}
};
------解决方案--------------------何不说下楼主是如何部署的,网上的东西多了,全是正确的吗?