title: OledbException - Field too small to accept amount of data
body: <p>I am trying to use OleDb to insert a new record into an Access database using an SQL command into an entity called 'tblThread' (containing discussion posts, if you are wondering); this is done via a button that will take values from two controls (both being textboxes). </p>
  
  <p>Here's the layout if you would like to see: <a href="https://gyazo.com/c43abf4ce055ff997b908badb57f549a" rel="nofollow noreferrer">https://gyazo.com/c43abf4ce055ff997b908badb57f549a</a> 
  However, after clicking on the button 'Submit Discussion', the control that inserts a new record I get an error display:</p>
  
  <p><a href="https://gyazo.com/1dbdb33290649af04f092533560b1d8c" rel="nofollow noreferrer">https://gyazo.com/1dbdb33290649af04f092533560b1d8c</a></p>
  
  <p>Now here's the code for the Click event of this button:</p>
  
  <p><strong>Please Note:</strong></p>
  
  <ul>
  <li><p>absDefault._memberType = 'Teacher' (in this scenario)</p>
  
  <pre><code>    private void btnCreate_Click(object sender, EventArgs e)
  {
      OleDbConnection objConnection = new OleDbConnection(absDefault.conString);
      OleDbCommand objCommand = new OleDbCommand();
      objCommand.Connection = objConnection;
  
      if (MessageBox.Show("[Piltover]: Are you sure you would like to create this thread", "", MessageBoxButtons.YesNo) == DialogResult.No)
      {
          return; // Does not execute remaining code
      }
      else if (txtTitle.TextLength == 0)
      {
          MessageBox.Show("[Piltover]: You have not created a title");
      }
      else if (mtxtDescription.TextLength == 0)
      {
          MessageBox.Show("[Piltover]: You have not added description to your thread");
      }
      else
      {
          // DBConnection class is only used within this else block and is not needed anywhere else in this form
          DataSet ds; DataRow dRow;
          DatabaseConnection objConnect = new DatabaseConnection(); // Instantiating an object from DBConnectionClass and checking if an identical title exist is much faster than the OLEDB process (shown within try block below)
          objConnect.Connection_String = absDefault.conString;
          objConnect.SQL = "SELECT * FROM tblThread"; ds = objConnect.GetConnection;
          for (int i = 0; i &lt; ds.Tables[0].Rows.Count; i++)
          {
              dRow = ds.Tables[0].Rows[i];
              if (txtTitle.Text.ToUpper() == dRow.ItemArray.GetValue(1).ToString())
              {
                  MessageBox.Show("[Piltover]: Thread already exist with the title name given");
                  return; 
              }
          }
      }
      // FIX - test to see if it works
  
      try
      {
          objConnection.Open();
  
          // Insert new thread record; avoids SQL injection
          objCommand.CommandText = String.Format("INSERT INTO tblThread ([Title], [Description], [ID], [Username], [TeacherBool]) VALUES (@title, @desc, @id, @username, @teacherbool)");//, absDefault.newThreadMemberType);
          objCommand.Parameters.AddWithValue("@title", txtTitle.Text);
          objCommand.Parameters.AddWithValue("@desc", mtxtDescription.Text);
          objCommand.Parameters.AddWithValue("id", absDefault._idNumber);
  
          if (absDefault._memberType == "Teacher")
          {
              currentTeacher = new csTeacher(absDefault._idNumber, "Teacher");
              objCommand.Parameters.AddWithValue("@teacherbool", "True");
              objCommand.Parameters.AddWithValue("@username", currentTeacher.Username);
          }
          else // else 'Student'
          {
              currentStudent = new csStudent(absDefault._idNumber, "Student");
              objCommand.Parameters.AddWithValue("@teacherbool", "False");
              objCommand.Parameters.AddWithValue("@username", currentStudent.Username);
          }
  
          objCommand.ExecuteNonQuery();
          MessageBox.Show("[Piltover]: Thread created");
  
          objConnection.Close();
      }
      catch (Exception Ex)
      {
  
          MessageBox.Show(Ex.ToString());
      }
  }
  </code></pre></li>
  </ul>
  
  <p>I am guessing the problem lies in the attribute [Description], although, I have set the data type to long text:
  <a href="https://gyazo.com/2d99c945a0a0b98a1e48e8abaf043c2f" rel="nofollow noreferrer">https://gyazo.com/2d99c945a0a0b98a1e48e8abaf043c2f</a></p>
  
  <p>If you are wondering what contains within my DatabaseConnection class:
  <a href="http://pastebin.com/RQs6qPEz" rel="nofollow noreferrer">http://pastebin.com/RQs6qPEz</a></p>
  
  <p>What I am confused is, my inputs are within boundaries (being under 255 characters, if that is the problem):
  For example, <a href="https://gyazo.com/c43abf4ce055ff997b908badb57f549a" rel="nofollow noreferrer">https://gyazo.com/c43abf4ce055ff997b908badb57f549a</a>
  As you can see, the 'masked textbox' besides label 'Description' contains values less than 255 characters.</p>
  
  <p>I <strong>have</strong> tried debugging to try and find a solution/answer.</p>