How to compare two data tables and get the different records into third data table or another way : private void AddRecords(object sender, EventArgs e)
        {
            string accessconst = "Provider = Microsoft.Jet.OLEDB.4.0; Data Source = C:/Program Files (x86)/BALLBACH/Database/Messdaten.mdb";
            DataTable table = new DataTable();
            using (OleDbConnection conn = new OleDbConnection(accessconst))
            {
                using (OleDbDataAdapter da = new OleDbDataAdapter("SELECT * FROM Messdaten", conn))
                {
                    da.Fill(table);
                }
            }

            string sqlconstr = "Data Source=DESKTOP-FVGI2J4\\SQLEXPRESS;Initial Catalog=Ballbach;Integrated Security=True";
            DataTable tablesql = new DataTable();
            using (SqlConnection conn = new SqlConnection(sqlconstr))
            {
                using (SqlDataAdapter da = new SqlDataAdapter("SELECT p1 FROM UMP", conn))
                {
                    da.Fill(tablesql);
                }
            }
            using (SqlConnection con = new SqlConnection("Data Source=DESKTOP-FVGI2J4\\SQLEXPRESS;Initial Catalog=Ballbach;Integrated Security=True"))
            {
                using (SqlCommand cmd = new SqlCommand())
                {

                    cmd.CommandText = "INSERT INTO UMP VALUES (@p1, @p2, @p3)";
                    cmd.Connection = con;
                    cmd.Parameters.Add("@p1", SqlDbType.NVarChar, 50);
                    cmd.Parameters.Add("@p2", SqlDbType.NVarChar, 50);
                    cmd.Parameters.Add("@p3", SqlDbType.NVarChar, 50);
                    con.Open();
                    for (int i = 0; i < table.Rows.Count; i++)
                    {

                        cmd.Parameters["@p1"].Value = table.Rows[i][0];
                        cmd.Parameters["@p2"].Value = table.Rows[i][1];
                        cmd.Parameters["@p3"].Value = table.Rows[i][2];
                        try
                        {
                            cmd.ExecuteNonQuery();
                        }
                        catch (Exception ex)
                        {
                            MessageBox.Show(ex.Message);
                            break;
                        }
                    }
                }
            }
        }