ArgumentExecption was unhandled...HELP

Aug 4 2007 4:18 PM

Well I have gotten the code to compile.. thats good but when I Start debugging I get the following error
"No mapping exists from object type System.Windows.Forms.TextBox to a known managed provider native type."
from the  line:

Submit_btn.ExecuteNonQuery();

Not really sure what is causing this.  Here is the code for the button


private void Submit_btn_Click(object sender, EventArgs e)
        {
            myconnection.Open();

            SqlCommand Submit_btn = new SqlCommand("mp_submit", myconnection);
            Submit_btn.CommandType = CommandType.StoredProcedure;

            //Submit_btn.Parameters.AddWithValue("@Description", Desc_cb);
            Submit_btn.Parameters.AddWithValue("@Call", Call_box);

            Submit_btn.ExecuteNonQuery();
            myconnection.Close();
        }

I even commented out a line and rewrote the stored procedure and created a new table just to see if I could insert anything.


Answers (2)