private OracleDependency _dep; public void Method() { OracleCommand cmd = new OracleCommand(query, _conn); _dep = new OracleDependency(cmd); _dep.QueryBasedNotification = true; _dep.RowidInfo = OracleRowidInfo.Include; _dep.OnChange += OnNotificaton; cmd.Notification.IsNotifiedOnce = false; cmd.Notification.Timeout = 0; cmd.Notification.IsPersistent = true; cmd.ExecuteReader(); }
同样一段代码,在控制台运行时,能够触发到onchange ,但是安装到windiws服务时就不会触发,点头绪都没得,希望能有大神能够解惑