[Quote]Your loop doesn't insert any data - it just repeatedly overwrites the command's parameters. The only calls to the database are befor the loop begins and after it ends, to get the starttime and the endtime. [/Quote]
how you are saying that loop will not insert the data.I have used
command.CommandText = "Insert into test (Col1, Col2);
command.Prepare();
for (int i = 0; i < count; i++) /*Loop Starts heres*/
{
command.Parameters.AddWithValue("@param1", 0);
command.Parameters.AddWithValue("@param2", 0);
command.ExecuteNonQuery();
command.Parameters.Clear();
}
I have missed the last 2 lines command.ExecuteNonQuery(); and command.Parameters.Clear(); statement in the code.
[Quote]Also, it's not a good idea to call Console.WriteLine inside the measured time.[/Quote]
I am writing the output to a variable and writing it finally to a text file at the end of the work completion. i have specified Console.WriteLine(); in order to show you how it is taken.
Thanks!