【问题标题】:Odd error calling SQLCommand.ExecuteReader() from powershell从 powershell 调用 SQLCommand.ExecuteReader() 的奇怪错误
【发布时间】:2013-03-28 22:55:41
【问题描述】:

当您调用SqlCommand.ExecuteReader() 时,下面的Powershell 错误是什么意思?

System.Management.Automation.ValidationMetadataException: 参数“+”不属于集合 "unicode,utf7,utf8,utf32,ascii,bigendianunicode,default,oem" 指定 通过 ValidateSet 属性。提供集合中的参数 然后再次尝试该命令。在 System.Management.Automation.ValidateSetAttribute.ValidateElement(对象 元素)在 System.Management.Automation.ValidateEnumeratedArgumentsAttribute.Validate(对象 参数,EngineIntrinsics engineIntrinsics)在 System.Management.Automation.ParameterBinderBase.BindParameter(CommandParameterInternal 参数,CompiledCommandParameter 参数元数据, ParameterBindingFlags 标志)

(立即回复;我只是想分享我的调试经验,因为我找不到它)

【问题讨论】:

    标签: sql powershell ado.net sqlcommand


    【解决方案1】:

    查询的文本包含“GO”语句。正在进行某种安全过滤,这被认为是编码问题。

    如果这种事情再次发生,对我或宇宙来说只是一个仅供参考。在我生命中的四个小时中,我希望我能够在 Google 上离开。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-07-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-06-01
      • 1970-01-01
      • 2020-02-06
      • 2014-12-21
      相关资源
      最近更新 更多