title: C# Insert Picture into Ms Access
body: <p>I would like to thanks to all who helped in last question.
  but now, i have problem with another statement which is saveimageto MS access.
  First, I would like to ask, on ms access database, Datatype should put attachment?</p>
  
  <p>my code: </p>
  
  <pre><code>private void button2_Click(object sender, EventArgs e)
          {
  
              OleDbCommand cmd = new OleDbCommand();
              cmd.CommandType = CommandType.Text;
              cmd.CommandText = "insert into Table1 (id,picture) values ('" + textBox1.Text +  "')";
  
              cmd.Connection = con;
              con.Open();
              cmd.ExecuteNonQuery();
              System.Windows.Forms.MessageBox.Show("Created", "Caption", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
              con.Close();
  
          }
  </code></pre>
  
  <p>I insert my picture to picturebox using openFIledialog.</p>