0

This is my table 'persona' enter image description here

The 'apellido' field is 10 characters long. However when I add a new record with more characters in that field ... enter image description here

It does not give me the error that it should give me, as the data is longer than what the field allows. In addition to registering the wrong data with the 10 characters that the field allows ... enter image description here

Consequently my program cannot rollback when a wrong data is written in that field because Mysql does not consider it an error. Try modifying the autocommit: SET autocommit = OFF But the problem persists Can you help me understand this problem please, I would greatly appreciate it. Greetings community.

  • You get a warning when the data has been truncated (error code 1265). You can check for warnings in your query. Or do you want to do something different? – Progman Sep 25 '20 at 23:26
  • thank you i have to modifycate the my.ini file and put sql_mode=STRICT_ALL_TABLES for now is runnig thank you <3 – Juanucho Sep 29 '20 at 23:02

0 Answers0