Hi all
How to call a CLR Stored Procedure from codebehind of an aspx page?
I am using SqlCommand with commandtext as CLR Stored Procedure name and SqlHelper.ExecuteDataSet() as below.
string connectionString = ConfigurationManager.AppSettings["ConnectDB"];
SqlConnection sn = new SqlConnection(connectionString);
SqlParameter[] sqlParameters = new SqlParameter[1];
sqlParameters[0] = new SqlParameter("@query", SqlDbType.Int);
sqlParameters[0].Value = "SELECT * FROM Inventory";
DataSet ds=new DataSet();
try
{
ds = SqlHelper.ExecuteDataset(sn, "[dbo].[prc_clr]", sqlParameters);
}
catch (Exception ex)
{
throw;
}
But I am getting exception "The stored procedure '[dbo].[prc_clr]' doesn't exist.".
Please help.