| Bug #37272 | Parameter names: '?' instead of '@' | ||
|---|---|---|---|
| Submitted: | 9 Jun 2008 5:22 | Modified: | 11 Jun 2008 0:41 |
| Reporter: | Poul Bak | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | Connector / NET | Severity: | S3 (Non-critical) |
| Version: | 5.2.2 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | parameter name | ||
[11 Jun 2008 0:41]
Poul Bak
After re-reading the new recommandations, I can see this is, at it should be, sorry!

Description: I read the following in the help fil for MySqlCommand: "Note: Prior versions of the provider used the '@' symbol to mark parameters in SQL. This is incompatible with MySQL user variables, so the provider now uses the '?' symbol ........" However , in the source file 'CommandBuilder.cs' I find several places where the '@' symbol is used when creating parameter names. For instance the method at starting at line 224: protected override string GetParameterName(string parameterName) At line 236, it says: return String.Format("@{0}", sb.ToString()); There are about 5 occurences of '@' in that file (use a search). Am I totally wrong, or shouldn't they be changed to '?' ? How to repeat: Nothing to repeat, since it still works. Suggested fix: Change all occurences to a question mark '?'