New value is provided with MySqlParameter with following code:
Code: Select all
cmd.Parameters.Add("ProductName", MySqlType.VarChar, 50);
par.Value = "Long-long string that is larger than fifty characters.";
Then, query is executed using cmd.ExecuteNonQuery() method.
As a result MySql server returns "Data too long for column "ProductName" at row 1" error.
BUT, specification says:
"If the size of the value supplied for a DbParameter exceeds the specified Size, the Value of the DbParameter will contain the specified value, truncated to the Size of the DbParameter.".
When I call Add(string parameterName, Devart.Data.MySql.MySqlType dbType, int size) method of Devart.Data.MySql.MySqlParameterCollection, Size property of parameter is set to 50 and I expect provider to truncate the value to 50 characters long.
Version: 8.3.181.0