title: Error In updating Ms-Access Table from C# Code
body: <p>I am trying to update my Access table from a C# form. When I run the program it runs without any message but when I click on Update it breaks and gives the following error message:</p>
  
  <blockquote>
    <p><em>Input string was not in a correct format.</em></p>
    
    <p>ACCESS TABLE FIELDS:- ID(string), Name(string), Score(int)</p>
  </blockquote>
  
  <p>Error Message :- </p>
  
  <pre><code> public Form1()
   {
      InitializeComponent();
   }
  
   OleDbConnection conn = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\Database3.accdb");
  
   public void UpdateRecord()
   {
          int score = Convert.ToInt32(textBox2.Text);
          **string command = "update score set Name= '"+textBox1.Text+"' , Score= '"+score+"' where ID= '"+textBox3.Text+"'  ";**
      OleDbCommand cmd = new OleDbCommand(command,conn);
      conn.Open();
  
      cmd.ExecuteNonQuery();
  
  public void showData()
  {
     string command = "Select * from score";
     OleDbCommand cmd = new OleDbCommand(command, conn);
  
     OleDbDataAdapter da = new OleDbDataAdapter(cmd);
     DataTable Table = new DataTable();
     da.Fill(Table);
     dataGridView1.DataSource = Table;
  }
  </code></pre>