Calculating upload time

Hi,

I want to insert 5000 rows into mysql database, how to catch the process time ? so far while do inserting row into database, its just an hour glass mouse pointer showing and waiting, I wanna catch it as easy like, when i do downloading the file, just put the code in http socket,

ProgressBar1.Maximum=BytesLeft ProgressBar1.Value=BytesSent

So I can see the progress.

any help.

thanks
arief

  1. Record the start time
  2. In every insert, record the current time
  3. Elapsed time = Current Time - Start Time
  4. Total time = (Elapsed Time) / ( current record count / total record count)
  5. Remaining time = Total Time - Elapsed Time

It will get more accurate as more records are inserted, but I suggest not showing values until the total time stops increasing.

okay, I will give a try.

Thanks
Regards,
Arief