I think I might have discovered a bug while trying to figure out if I could used the question mark ("?") placeholder in SQL parameters using MM and SqlClient data provider.
The "the mmDataAccessSql.TranslateParameters" method loops through Parameter collection in a command object, with intent to replace the "?" placeholder with the names of each sequential parameter (i.e. "@param1"). But the "Replace" method is used, which appears to replace ALL occurrences of the "?" placeholder, so when the second parameter is reached in the loop, all the placeholders have been replaced with the name of the first parameter. The code that looks suspect is the following line:
if (Position >= 0)
{
cmdText = cmdText.Replace("?", param.ParameterName);
}
It seems as though only the FIRST occurrence should be replace, while this replaces ALL the occurrences of "?".