/// <summary> /// Execute the query used to populate the workbook. /// </summary> /// <returns>False if the query raises an exception.</returns> public bool RunQuery() { // start the query OnQueryStarted(); try { queryReader.OpenReader(); } catch (SqlException e) { if (QueryException != null) { QueryException(this, new QueryExceptionEvents(e)); } else { throw; } return(false); } lock (workerLock) if (!workers.First().cancelled) { workers.First().t.Start(); } queryRan = true; return(queryRan); }