Kexi/Releases/Kexi 2.4/Workaround 301136: Difference between revisions

From KDE Community Wiki
< Kexi‎ | Releases‎ | Kexi 2.4
 
(6 intermediate revisions by the same user not shown)
Line 4: Line 4:


==Workaround for .kexi files==
==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.
'''Please note, any data (if there is any) will be lost in the table.'''
 
Users that require texts longer than 200 characters in certain fields can 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).  
 
In the future (maybe Kexi 2.5), there will be no data removal when the Length property is edited.


==Advanced workaround for .kexi files==
==Advanced workaround for .kexi files==
This is advanced workaround without data removal. First please back up your .kexi file.  
'''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).  
To enlarge the limit by hand, edit your kexi file using sqlite3 command line tool or sqliteman editor (http://sqliteman.com).  
Line 15: Line 19:
1. Display contents of kexi__objects system table. In sqlite3 it can be as follows for the sample database attached to bug 301136 report [https://bugs.kde.org/show_bug.cgi?id=301136#attach_71555]:
1. Display contents of kexi__objects system table. In sqlite3 it can be as follows for the sample database attached to bug 301136 report [https://bugs.kde.org/show_bug.cgi?id=301136#attach_71555]:


(ask sqlite to show headers of the table columns)
.headers on


  sqlite >select * from kexi__objects;
then:
  sqlite> select * from kexi__objects;


  o_id|o_type|o_name|o_caption|o_desc
  o_id|o_type|o_name|o_caption|o_desc
Line 24: Line 31:


  sqlite> select * from kexi__fields where t_id=1;
  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
  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|4|id|0|0|119|1|0|0|Id|
Line 33: Line 41:
4. Repeat step 3. for any text field in this table you wish to "fix".
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.
5. Now exit the tool (ctrl+D in sqlite3), and start Kexi. You can see the new length(s) in design mode of the respective table(s).


===Notes===
===Notes===

Latest revision as of 02:06, 4 June 2012

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

Please note, any data (if there is any) will be lost in the table.

Users that require texts longer than 200 characters in certain fields can 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).

In the future (maybe Kexi 2.5), there will be no data removal when the Length property is edited.

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 the new length(s) in design mode of the respective table(s).

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.