Hello!
There is a table and there is a column in it, the type of which is enum because of it all problems arise.
I use the following method to perform the necessary manipulations with table entries (insert / update).
public void AddParametersString(MySqlCommand command, string[] variables, MySqlDbType[] mySqlDbTypes, string[] values) { int i = 0, j=0; foreach (string val in values) command.Parameters.Add(variables[i++], mySqlDbTypes[j++]).Value = val; } When I try to add or change an entry, the following error occurs:
Data truncated for column 'department' at row 1 This column is of enum type whose values are:
ENUM('Хлебо-булочный', 'Молочный', 'Колбасный', 'Мясной', 'Рыбный', 'Кондитерский', 'Овощной', 'Фруктовый', 'Кулинария', 'Полуфабрикаты', 'Вино-водочный', 'Бакалея')
Why it happens? How to solve this problem? Thanks in advance!)