title: How to insert a record into a access table using oledb?
body: <p>I have a this Items table in ms access </p>
  
  <pre><code>Items(Table)    
  Item_Id(autonumber)
  Item_Name(text)
  Item_Price(currency)
  </code></pre>
  
  <p>and i'm trying to insert a record using this code. </p>
  
  <pre><code>OleDbConnection myCon = new OleDbConnection(ConfigurationManager.ConnectionStrings["DbConn"].ToString());
          OleDbCommand cmd = new OleDbCommand();
          cmd.CommandType = CommandType.Text;
          cmd.CommandText = "insert into Items ([Item_Name],[Item_Price]) values ('" + itemNameTBox.Text + "','" + Convert.ToDouble(itemPriceTBox.Text) + "')";
          cmd.Connection = myCon;
          myCon.Open();
          cmd.ExecuteNonQuery();
          System.Windows.Forms.MessageBox.Show("An Item has been successfully added", "Caption", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
          myCon.Close();
  </code></pre>
  
  <p>Code is running without error but at the end no record is found in the table what mistake i'm doing?</p>