new to c#. I have a methof that just does some work so it does not return anything. when i load the page I get this error:
System.Data.SqlClient.SqlException: Line 1: Incorrect syntax near 'up_add'.
and it highlights the myCommand.ExecuteNonQuery; line
what's wrong here, code below...thanks in advance!!
SqlCommand myCommand = new SqlCommand();
myCommand.Connection = new SqlConnection(ConfigurationSettings.AppSettings["ConnectionString"]);
myCommand.CommandText = "up_add";
myCommand.Parameters.Add("@session_id", SqlDbType.Int).Value = SessionID;
myCommand.Parameters.Add ("@product_id", SqlDbType.Int).Value = ProductID;