This is my external procedure:
using (SqlConnection con = new SqlConnection("context conection=true"))
{
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
if (con.State == ConnectionState.Closed)
{
con.Open();
}
cmd.CommandText = "INSERT ...";
...
cmd.ExecuteNonQuery();
cmd.Dispose();
con.Close();
}
I have adding an assembly and the following procedure:
Create Proc usp_SaveFinanicalYear
(
... params
)
AS
EXTERNAL NAME SqlLibrary.StoreProcedures.SaveFinanicalYear
When I call this procedure I get the following error (screen shot):
A .NET Framework error occurred during execution of user-defined routine or aggregate "usp_SaveFinanicalYear":
System.ArgumentException: Keyword not supported: 'context conection'.