1

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 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.