title: Insert values from textbox into DB2 Database
body: <p>I want to insert value into my table. (Database:-DB2) based on the value obtained by text box. I'm creating a demo page where my text box will get an integer value and on button click it must insert into the database. The issue is there is no such method called <code>AddWithValue()</code> when we are dealing with DB2 Connection. <strong>Now how i can obtain value from text box so i can insert into the table??</strong></p>
  
  <pre><code>protected void Button3_Click(object sender, EventArgs e)
          {
              String pass = TextBox4.Text;
              DB2Connection connect = new DB2Connection("Database=SAMPLE;UserID=xxxxxxx;Password=xxxxxx;Server=xx.xx.xx.xx:50000");
              DB2Command cmd = new DB2Command();
              cmd.Connection = connect;
              cmd.CommandText = "INSERT INTO Demo VALUES (@pass)";
              cmd.Parameters.AddWithValue("@pass", pass);
              connect.Open();
              cmd.ExecuteNonQuery();
              connect.Close();
          }
  </code></pre>
  
  <p>ERROR 1:</p>
  
  <blockquote>
    <p>IBM.Data.DB2.DB2ParameterCollection does not contain a definition for
    'AddWithValue' and no extension method 'AddWithValue'accepting a first
    argument of type 'IBM.Data.DB2.DB2ParameterCollection' could be found</p>
  </blockquote>
  
  <p>Also, On <code>cmd.ExecuteNonQuery()</code> its showing me an error
   ERROR 2:</p>
  
  <blockquote>
    <p>{Function evaluation disabled because a previous function evaluation
    timed out. You must continue execution to reenable function
    evaluation.}</p>
  </blockquote>