Main()
{
WinOpTableAdapters.attendanceTableAdapter tx;
tx = new WinOpTableAdapters.attendanceTableAdapter();
Thread th = new Thread(new ThreadStart(Insrt)); //thread
th.Start();
}
void Insrt()
{
WinOpTableAdapters.attendanceTableAdapter tx;
tx = new WinOpTableAdapters.attendanceTableAdapter();
for (int j = 0; j <= 100000; j++)
{
tx.InsertQueryAttend("Admin" + j);
}
}
I want to insert 1 million items of data into a database in more efficient way, the code shown takes 5 mins to insert 5000 rows into database