You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When constructing a SqlParameter or adding a parameter to an SqlParameterCollection, and the parameter type is (n)varchar, a max length should always be specified. If a max length is not specified then the length of the value is used causing a different execution plan each different length of parameter value.
Does setting the size to -1 specify a max-length execution plan every time, or does SQL still generate different execution plans based on the string length?
When constructing a SqlParameter or adding a parameter to an SqlParameterCollection, and the parameter type is (n)varchar, a max length should always be specified. If a max length is not specified then the length of the value is used causing a different execution plan each different length of parameter value.
Examples of violations include:
The text was updated successfully, but these errors were encountered: