Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    What should be the Type of MySQL "LongText" field be in DataSource Xml file

    I have a database field Comment which is of type LongText what should be its type in Datasource file?
    If I am using LONGTEXT as below it throws "ERROR: com.google.gwt.event.shared.UmbrellaException: Exception caught: (TypeError) : "
    <field name="Comment" title="Comment" type="LONGTEXT" editorType="TextAreaItem"></field>


    and using type="TEXT" throws "WARNING: Data truncation: Data too long for column 'Comment' at row 1" while performing update operation when Comment is already present.
    <field name="Comment" title="Comment" type="TEXT" editorType="TextAreaItem"></field>


    #2
    "longtext" is not a valid value for DataSouceField.type - you should be using "text" (note: lowercase).

    If you still get an error once the type is corrected, please check whether the value you are trying to save is longer than the DB column - that seems to be what the database error is telling you.

    If the value doesn't appear to be longer than the column should be able to store, consider character encoding issues, eg if you are storing in UTF16, that's two bytes per char, and databases differ in terms of what column sizes mean (eg are they bytes or chars, and in what encoding).

    Comment

    Working...
    X