Parameter '@myLeft' must be defined

后端 未结 4 1732
南方客
南方客 2020-12-17 14:47

My question is quite similar to already answered ones but yet not. I\'d like some help sorting this out.

I\'m trying to add data to a database table but I get keepin

4条回答
  •  暖寄归人
    2020-12-17 15:14

    I found the solution to this problem by making an extensive Google search for undefined parameters in MySQL. This article (MySql.Data.MySqlClient.MySqlException: Parameter ‘@id’ must be defined) covers the basics of the problem. It's as far as I understand related to an upgrade of the connector.

    You need to add Allow User Variables=True in the connection string in order to use custom variables. Pretty simple solution to an equally tough problem. ;)

提交回复
热议问题