Error Code: 1406. Data too long for column 'txtcontabilidad' at row 1

Not MySQL..

I want to update a text field, the same has about 300 characters and does not allow to do it, informed that it is too long. I have tried changing the field type even to "LONGTEXT", "VARCHAR(1000)" and did not allow. Is it any limitation in MySQL settings or something? What to do in this situation?

Author: mcardoso, 2014-08-06

1 answers

Changing the field to longtext should solve the problem, this error is triggered when the amount of characters is greater than the field storage, so the excess characters are truncated.

The limit of the varchar field is 255 (0 to 255).

Try changing to longtext again, remember to change the table name, CHARACTER SET and DEFAULT if necessary,

ALTER TABLE nomeDaTabela CHANGE txtContabilidade txtContabilidade LONGTEXT CHARACTER 
    SET latin1 COLLATE latin1_general_ci NULL DEFAULT NULL;

If you can't, send the problem codes, query insert, query select and the structure of your table, which I'll test around here and help you solve that.

 2
Author: John Calistro, 2014-08-07 13:20:28