title: How to properly copy a row of data from one Access database to another using C#?
body: <p>So, I have Launch_data.mdb and Out_data.mdb. 
  The data from a table (any) in Launch_data will be loaded in my form to a datagridview. The user will click on a row, and then click on a "Move to" button. The program needs to move that row from Launch_data.mdb to Out_data.mdb. Both databases have the same table names and structures.</p>
  
  <p>Code:</p>
  
  <pre><code>private void button3_Click(object sender, EventArgs e)
  {
     con1.Open();
     using (var cmd = new OleDbCommand())
     {  
        cmd.Connection = con1;
        cmd.CommandType = System.Data.CommandType.Text;
        cmd.CommandText =
        @"INSERT INTO " + treeView1.SelectedNode.Name + " IN " + System.IO.Directory.GetCurrentDirectory() + @"\Out_data.mdb " +
        @"SELECT * FROM " + treeView1.SelectedNode.Name + " WHERE [Added at:] LIKE ('" + SelectedKey + "')";
        cmd.ExecuteNonQuery();
     }
     con1.Close();
  }
  </code></pre>
  
  <p>And con 1 is: </p>
  
  <pre><code>OleDbConnection con1 = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + System.IO.Directory.GetCurrentDirectory() + @"\Launch_data.mdb");
  </code></pre>
  
  <p>When I ran the code, CommandText contained: <code>"cmd.CommandText = "INSERT INTO H11 IN C:\\Users\\uidg3149\\Desktop\\PPAP Area management\\PPAP Area management\\bin\\Debug\\Out_data.mdb SELECT * FROM H11 WHERE [Added at:] LIKE ('3/24/2014 2:31:15 PM')""</code> <br/> which for me looks ok (should insert what it should where it should, BUT it gives me <code>"Syntax error in INSERT INTO statement."</code>. I am pretty new to C# and it's the first time I try to do such operation.</p>