I want to insert more than 5 lac records in SQL Server CE in Windows Mobile 6.1
The code I am using is taking about 8 rows per second. which is just unbearable.
My code is as follows - I have DataTable
with about 5 lac records:
SqlCeCommand cmd1;
for (int i = 0; i < table.Rows.Count; i++)
{
cmd1 = new SqlCeCommand("Insert into Master values('" + table.Rows[i].ItemArray[0].ToString() + "')", con);
con.Open();
cmd1.ExecuteNonQuery();
con.Close();
}
Please suggest alternatives (preferably bulk insert) that are faster.