# Data too long for a column?

**URL:** <https://forum.inductiveautomation.com/t/data-too-long-for-a-column/10500>\
**Category:** Ignition\
**Created:** [September 22, 2015, 6:46pm UTC](https://forum.inductiveautomation.com/t/data-too-long-for-a-column/10500 "2015-09-22T18:46:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alewayhar](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@alewayhar](https://forum.inductiveautomation.com/u/alewayhar)\
**Post date:** [September 22, 2015, 6:46pm UTC](https://forum.inductiveautomation.com/t/data-too-long-for-a-column/10500/1 "2015-09-22T18:46:58Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Duffanator](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/duffanator/32/3560_2.png) [@Duffanator](https://forum.inductiveautomation.com/u/Duffanator)\
**Post date:** [September 22, 2015, 6:55pm UTC](https://forum.inductiveautomation.com/t/data-too-long-for-a-column/10500/2 "2015-09-22T18:55:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![alewayhar](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@alewayhar](https://forum.inductiveautomation.com/u/alewayhar)\
**Post date:** [September 22, 2015, 7:02pm UTC](https://forum.inductiveautomation.com/t/data-too-long-for-a-column/10500/3 "2015-09-22T19:02:11Z")

</div>

Duffanator,

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