Mike

Mike

  • NA
  • 9
  • 0

Percent complete in C# console app

Jun 12 2008 3:37 PM
I've written a C# console application which, among other things, restores a SQL Server database. It takes a while to restore and I'm wondering if there is a way to display the percentage complete (like it shows when you restore a database manually in the Message pane when STAT is on) in my program console. I understand that if you have multiple tasks, rows, etc. you can calculate the percent completed based off the number of tasks completed divided by the total number of tasks. The problem is that I only have one task, to restore the database.

Answers (4)