0
votes

What does Powershell error below mean when you are calling SqlCommand.ExecuteReader()?

System.Management.Automation.ValidationMetadataException: The argument "+" does not belong to the set "unicode,utf7,utf8,utf32,ascii,bigendianunicode,default,oem" specified by the ValidateSet attribute. Supply an argument that is in the set and then try the command again. at System.Management.Automation.ValidateSetAttribute.ValidateElement(Object element) at System.Management.Automation.ValidateEnumeratedArgumentsAttribute.Validate(Object arguments, EngineIntrinsics engineIntrinsics) at System.Management.Automation.ParameterBinderBase.BindParameter(CommandParameterInternal parameter, CompiledCommandParameter parameterMetadata, ParameterBindingFlags flags)

(answer to follow immediately; I just wanted to share my debugging experience because I couldn't find it)

1

1 Answers

1
votes

The text of the query included a 'GO' statement. There's some sort of security filtering going on, and it is considered an encoding issue.

Just an FYI for me or the universe if that kinda thing happens again. Four hours of my life I wish I'd been able to Google away.