title: Dynamically construct insert statement
body: <p>My insert statement looks as follows:</p>
  
  <pre><code>using (OleDbCommand cmd2 = conn2.CreateCommand())
  {
      conn2.Open();
      cmd2.CommandText = "INSERT INTO Panel " + "([Symbol Name SE], [Symbol Name EP]) " + "VALUES(@Type01, @Type02)";
      cmd2.Parameters.AddRange(new OleDbParameter[]
      {
          new OleDbParameter("@Type01", variable1),
          new OleDbParameter("@Type02", variable2),
      });
      cmd2.ExecuteNonQuery();
      conn2.Close();
  }
  </code></pre>
  
  <p>I'd like to convert this into a generic insert function to which I can pass a table name, several columns and values, both as arrays and the function will construct the insert statement and execute it. I did try creating it with StringBuilder but I was not able to do it successfully. Any help is appreciated. Thanks!</p>