Parameter '@myLeft' must be defined

The error is very much informative, you are just using @myLeft parameter in your query without defining it. you ned to define that parameter like the others you have done.

objCmdInsert.Parameters.Add("?myLeft",...

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. ;)

Tags:

Mysql