You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running the SQLTabledependency in a task
After the SQLTabledependency is started a manual reset event waits till it get signals.
No SQLTabledependency events get fired.
How come.
public virtual async Task SqlDependencyAsync(
// public virtual Task SqlDependencyAsync(
, ManualResetEvent taskEndEvent
, string connectionString
, string tableName
, string schemaName
)
{
try
{
using (var tableDependency = new SqlTableDependency<PrintQueueSqlDependency>(connectionString
, tableName
, schemaName
, null
, null
, null
, DmlTriggerType.All
, false))
{
tableDependency.OnChanged += TableDependencyOnChange;
tableDependency.OnError += TableDependencyOnError;
tableDependency.OnStatusChanged += TableDependencyOnStatusChanged;
await taskEndEvent.ManualResetAsyncExtension();
// taskEvent.WaitOne();
}
}
catch (TableDependency.SqlClient.Exceptions.ImpossibleOpenSqlConnectionException ex)
{
IsRunningError = "Failed to run SQLTable Dependency. Could not connect to database";
);
}
catch (Exception ex)
{
IsRunningError =$"Failed to run SQLTable Dependency. { ex.Message}";
}
}
The text was updated successfully, but these errors were encountered:
I am running the SQLTabledependency in a task
After the SQLTabledependency is started a manual reset event waits till it get signals.
No SQLTabledependency events get fired.
How come.
public virtual async Task SqlDependencyAsync(
// public virtual Task SqlDependencyAsync(
, ManualResetEvent taskEndEvent
, string connectionString
, string tableName
, string schemaName
The text was updated successfully, but these errors were encountered: