I know this questions is rather general, but I have searched the whole day and I haven\'t been able to find the proper way to do this.
Here is my code to insert some
(Bonus answer:)
In case anyone is wondering whether an OleDbDataAdapter can insert the rows faster, it seems not. The following code does create the 100,000 records...
var da = new OleDbDataAdapter("SELECT [ID], [Title], [Price], [Tag], [Author] FROM [tblBooks] WHERE False", con);
var cb = new OleDbCommandBuilder(da);
cb.QuotePrefix = "["; cb.QuoteSuffix = "]";
var dt = new System.Data.DataTable();
da.Fill(dt);
for (int i = 0; i < 100000; i++)
{
System.Data.DataRow dr = dt.NewRow();
dr["Title"] = "Dummy Text 1";
dr["Price"] = 10;
dr["Tag"] = "Dummy Text 2";
dr["Author"] = "Dummy Text 3";
dt.Rows.Add(dr);
}
da.Update(dt);
...but it takes about 30% longer to run than the original code in the question.