public void load(DataTable data) { DataSet ds = new DataSet(); string strAccessConn = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + FolderPath + ";Extended Properties=dBASE IV;"; string strAccessSelect = "SELECT * FROM " + TableName; OleDbConnection myAccessConn = null; try { myAccessConn = new OleDbConnection(strAccessConn); } catch (Exception e){throw;} OleDbDataAdapter myDataAdapter = null; OleDbTransaction myTransaction = null; try { OleDbCommand myAccessCommand = new OleDbCommand(strAccessSelect, myAccessConn); myDataAdapter = new OleDbDataAdapter(myAccessCommand); OleDbCommandBuilder custCB = new OleDbCommandBuilder(myDataAdapter); myDataAdapter.InsertCommand=custCB.GetInsertCommand(); myDataAdapter.ContinueUpdateOnError=true; myAccessConn.Open(); myDataAdapter.Fill(ds, TableName); ds.Merge(data); myTransaction = myAccessConn.BeginTransaction(); myDataAdapter.InsertCommand.Transaction = myTransaction; myDataAdapter.Update(ds, TableName); myTransaction.Commit(); } catch (Exception ex){throw;} finally { myAccessConn.Close(); } }