gpt4 book ai didi

Azure 服务总线主题订阅引发有关 System.DBNull 的 FilterException

转载 作者:行者123 更新时间:2023-12-03 03:34:23 25 4
gpt4 key购买 nike

Azure 服务总线主题订阅中的所有消息都会发送到死信队列,并带有 FilterException 消息

Operator '==' cannot be applied to operands of type 'string' and 'System.DBNull'

过滤器的类型为SqlFilter,表达式为:

TriggerEvent in ("A01", "A04", "A28", "A47") OR (TriggerEvent = "A31" AND EventReasonCode = "REG_MANUAL")

它已经运行了几个月,没有出现任何 FilterException,并且目前在不同的生产环境中运行良好。

一位同事找到了此错误的原因,并且由于我在谷歌搜索此错误时没有找到任何相关内容,因此我将立即发布此问题及其答案。

最佳答案

出于某种原因,测试环境已更新为在触发事件和原因代码字符串周围使用双引号而不是单引号:

TriggerEvent = "A31" AND EventReasonCode = "REG_MANUAL"

当我们将其改回单引号时,一切都很好:

TriggerEvent in ('A01', 'A04', 'A28', 'A47') OR (TriggerEvent = 'A31' AND EventReasonCode = 'REG_MANUAL')

错误消息具有误导性,很难看出原因是什么,因为我在任何地方都找不到任何 System.DBNull 值。

关于Azure 服务总线主题订阅引发有关 System.DBNull 的 FilterException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73824488/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com