Apache OpenOffice (AOO) Bugzilla – Issue 42358
MySQL/ODBC: dynamic max-text-length on text fields works improperly
Last modified: 2013-08-07 15:45:17 UTC
- MySQL server 4.1.7-nt - MyODBC driver 3.51.10.00 - create a sample table with the SQL script from http://www.openoffice.org/nonav/issues/showattachment.cgi/22368/bug_fields.sql - display this table in the data source browser - drag'n'drop the column "f_text_enum" to an empty text document, pressing Ctrl-Shift, creating a form control this way - switch of the form design mode in the text document => the form (consisting of only one control) is loaded, the table content is shown in the field - in the text control, enter some text with at least 5 characters => the control has a max-text-length of 4 characters If you look at the properties of the control, it has a "Max. text length" of 0, which means it should determine it's actual max-text-length from the database field it is bound to. However, the f_text_enum table column has a length of 50, not 4, so the text control should have a dynamic max-text-length of 50, too. - Now display the bug_fields table in the data source browser - in the first record, in the column f_text_enum, enter the "long text", and save this - switch on the form design mode in the text document - switch off the form design mode in the text document -> the control is filled with the proper table data - try to enter some text in the control => the control now has a max-text-length of 9 => It seems that the control always has a max-text-length value from the content of the first record ...
fs->oj: my gutt feeling tells me that this is a driver issue ... In this case, please ensure that it's raised at bugs.mysql.com, and assign this one here to issues@dba. Thanks.
"Don't Optimize Column Widths" and "Return Matching Rows" has to be checked when creating the DSN http://bugs.mysql.com/bug.php?id=3855
as an externally-caused issue, it's unlikely that OOo can fix this for 2.0
Hi all, Just to add that this problem is also present in the 3.51.11 version of the MyODBC driver, as I recently encountered it myself, and it took me a while to realize what was going on. Alex
The default settings of MyODBC-3.51.11-2-win caused my text fields to be truncated because "Don't Optimize Column Widths" wasn't ticked. This was a MyODBC advanced option with the only help stating "The client can't handle that MYODBC returns the real width of a column". I only realised that this was my problem because upgrading from an earlier version of MyODBC resulted in this being set (on one computer) while a new DSN on a newly installed MyODBC 3.5.11- 2 resulted in the option cleared (on another computer). As a simple user I didn't want to be involved in these issues. I don't care which product it is fixed in; OOo or MySQL, I'll leave that to experts.
Created attachment 74172