Kexi/Releases/Kexi 2.4/Workaround 301136

From KDE Community Wiki

This is workaround for Bug #301136 "Kexi shows no indication that text is trimmed".

Applies to: all Kexi versions since 1.0.

Workaround for .kexi files

Users that require texts longer than 200 characters in certain fields, please change the property of these fields to larger value (as large as you want and see reasonable). No built-in limitations is present in .kexi files (except your RAM memory limit). Please note, any data will be lost in the table.

Advanced workaround for .kexi files

This is advanced workaround without any data removal. First please back up your .kexi file.

To enlarge the limit by hand, edit your kexi file using sqlite3 command line tool or sqliteman editor (http://sqliteman.com).

Perform the following steps for each table you want to "fix":

1. Display contents of kexi__objects system table. In sqlite3 it can be as follows for the sample database attached to bug 301136 report [1]:

(ask sqlite to show headers of the table columns)

.headers on

then:

sqlite> select * from kexi__objects;
o_id|o_type|o_name|o_caption|o_desc
1|1|table1|Table1|

2. Now we know the table1 has ID == 1. So now display information about all fields for this table:

sqlite> select * from kexi__fields where t_id=1;
t_id|f_type|f_name|f_length|f_precision|f_constraints|f_options|f_default|f_order|f_caption|f_help
1|4|id|0|0|119|1|0|0|Id|
1|11|short|200|0|0|0||1|short|

3. Now we can see the definition of table1.short field that interests us. It says that f_length value is set to 200 (the Kexi default). It can be now changed in this very field, e.g. to 5000:

sqlite> update kexi__fields set f_length=5000 where t_id=1 and f_name='short';

4. Repeat step 3. for any text field in this table you wish to "fix".

5. Now exit the tool (ctrl+D in sqlite3), and start Kexi. You can see in design mode of the respective table that.

Notes

  • Please note that decreasing the f_length value will not trim the text (good news) nor increasing the value will not de-trim the text if it was lost before (bad news).

Advanced workaround for server-based projects

Similarly this can be done for mysql or postgresql based project, with data browsing tool for the respective database. First please back up your database.