lw1073281985
lw1073281985
2019-04-28 15:41

ibatisnet调用mysql的存储过程报错“Parameter '?' not found in the collection.”

5
  • c#
  • asp.net
  • mysql

ibatisnet调用mysql的存储过程报错
是不是我的providers.config代码有误产生的

<provider
    name="MySql"
    description="MySQL, MySQL provider 5.6.35"
    enabled="true"
    assemblyName="MySql.Data, Version=6.5.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" connectionClass="MySql.Data.MySqlClient.MySqlConnection"
    commandClass="MySql.Data.MySqlClient.MySqlCommand"
    parameterClass="MySql.Data.MySqlClient.MySqlParameter"
    parameterDbTypeClass="MySql.Data.MySqlClient.MySqlDbType"
    parameterDbTypeProperty="MySqlDbType"
    dataAdapterClass="MySql.Data.MySqlClient.MySqlDataAdapter"
    commandBuilderClass="MySql.Data.MySqlClient.MySqlCommandBuilder"
    usePositionalParameters="false"
    useParameterPrefixInSql="true"
    useParameterPrefixInParameter="true"
    parameterPrefix="?"
    allowMARS="false"
  />

parameterPrefix="?"符号是问号就会报“Parameter '?' not found in the collection. ”,如果我改成parameterPrefix="@"就会报“Parameter '@' not found in the collection. ”

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答