MyPivoRunner & Progress bar control

47 views Asked by At

I'd like to show a Progress Bar Control while running the Pivot script file. However, when updating my database, there's a long wait (several minutes) when the UpdateTable method is called for the first time. Is there a way to track all executed SQL queries? (somthing like with the TraceServer class / SQL Profiler)?

PivotRunner runner = new MyPivotRunner();
runner.ConnectionString = _myPersistence.ConnectionString;
runner.Run();

public class MyPivotRunner : PivotRunner
{

...

protected override void UpdateTable(PivotRunnerTable table, Table existingTable)
{
    base.UpdateTable(table, existingTable);

    // first call: hanging several minutes 
    // second and following calls: ok
}
1

There are 1 answers

0
MChiva On

You could implement a Logger (IServiceHost) and set it on your Runner through Logger property. Many ExecuteQuery used at several steps called by UpdateTable are logged using the existing Logger if one is provided.