我观察到getId()
事件在我在办公室网络中时被触发,但在我的家庭网络中未触发。我已完成以下步骤:
在C#应用程序中,我添加了以下代码:
SqlTableDependency
即使在表//created the new instance
tableDependency = new SqlTableDependency<User>
(mStarterConnectionString, tableName); //subscribed to the events
tableDependency.OnChanged += TableDependency_OnChanged;
tableDependency.OnStatusChanged +=
TableDependency_OnStatusChanged;
tableDependency.OnError += TableDependency_OnError;
tableDependency.TraceLevel =
System.Diagnostics.TraceLevel.Verbose;
tableDependency.TraceListener = new
TextWriterTraceListener(Console.Out);
tableDependency.Start();
中插入新记录的情况下,执行WAITFOR
命令后也不会执行任何操作。我的控制台出现错误:
SqlDependencyTest