Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception message grammar: "An SqlParameter [...] is not contained by this SqlParameterCollection" #159

Closed
jnm2 opened this issue Aug 19, 2019 · 6 comments
Assignees

Comments

@jnm2
Copy link

jnm2 commented Aug 19, 2019

Repro:

using (var command = new SqlCommand(null, null))
{
    _ = command.Parameters["@foo"];
}

System.IndexOutOfRangeException: An SqlParameter with ParameterName '@​foo' is not contained by this SqlParameterCollection.

Expected: "A SqlParameter," not "An SqlParameter"

Source:

https://github.com/dotnet/corefx/blob/6739eab2f4ee9a895575289893edf63b6c234d43/src/System.Data.SqlClient/src/Resources/Strings.resx#L122-L124

@Wraith2
Copy link
Contributor

Wraith2 commented Aug 19, 2019

https://www.grammar.com/a-vs-an-when-to-use/
"Here’s the secret to making the rule work: The rule applies to the sound of the letter beginning the word, not just the letter itself."
Since SQL starts with S which is /ess/ it feels right to me.

@jnm2
Copy link
Author

jnm2 commented Aug 19, 2019

I filed this issue on the basis of that rule, since my brain balked at the sound of "An sequel parameter."

Here's the part I didn't think of. I think most people pronounce it 'sequel.' My anecdata suggests that 'ess que ell' is super rare to hear in talks, videos, face to face. If there's a single mainstream pronunciation, we should follow it.

https://english.stackexchange.com/questions/7231/how-is-sql-pronounced

@Wraith2
Copy link
Contributor

Wraith2 commented Aug 19, 2019

I say it as an acronym, probably because it is, but I have no strong opinion on that vs sequel as long as mutual understanding occurs. To me the message reads in a stilted way if you force A vs An, it's as if the A is followed by a fullstop rather than being a smooth flow "aness".

This is not a (mole)hill I would choose to die on, if anyone decides to change it then so be it. 😁

/cc @cheenamalhotra

@jnm2
Copy link
Author

jnm2 commented Aug 19, 2019

I vote for this person's suggestion for how to pronounce it: https://www.reddit.com/r/NoStupidQuestions/comments/41wdnr/is_sql_pronounced_s_q_l_or_sequel/cz65b28/

"Jif"

@yukiwongky
Copy link
Contributor

@jnm2 Attached is the driver built from PR #252 containing the fix. Can you verify if the fix is ok?

Microsoft.Data.SqlClient.1.1.0-dev.zip

@yukiwongky
Copy link
Contributor

Closing this as the fix in PR #252 is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants