I know this is most-likely a simple question but when you restore a database from inside SQL management studio you can set the update interval with stats
RESTORE DATABASE [test] FROM DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\test.bak' WITH FILE = 1, NOUNLOAD, STATS = 10
If I wanted to execute that line of code from inside c# how would i get the progress? Currently I just use System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
but I can not figure out how to get the progress.
Also, if it is any faster, using the Microsoft.SQLServer namespace is acceptable.