Data too long for a column?

I was testing out my program and my button works fine, so I know my script, and SQL code is ok, but I noticed that I kept getting an error if the note I was adding was too long. It looked like this.

VALUES (?, ?, ?, ?)": Data truncation: Data too long for column ‘Notes’ at row 1
caused by MysqlDataTruncation: Data truncation: Data too long for column ‘Notes’ at row 1

Is this a setting within the MY SQL DB that I need to change so that there is not a character cap on a note that can be added to the database? And I’m not talking about typing a paragraph or anything, but I typed the following and it was too long: “How long is too long for a note to be added??” Just wondering if it’s a setting within MY SQL or within Ignition that i need to change?

Yes, that sounds like a limit on your DB table column. I’m not super familiar with MySQL, but if you look at the datatype for that column it’s probably varchar(XXX). The XXX part is a number that tells you how many characters is allowed in the string. You will have to change the datatype to a longer varchar.


That was it! Thanks so much! It was set to VarChar(45) so I made it VarChar(4500) for good measure! Thanks so much!