Issue 42358 - MySQL/ODBC: dynamic max-text-length on text fields works improperly
Summary: MySQL/ODBC: dynamic max-text-length on text fields works improperly
Status: CONFIRMED
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: 680m77
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-09 16:44 UTC by Frank Schönheit
Modified: 2013-08-07 15:45 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Frank Schönheit 2005-02-09 16:44:43 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 ...
Comment 1 Frank Schönheit 2005-02-09 16:47:27 UTC
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.
Comment 2 ocke.janssen 2005-02-10 08:33:32 UTC
"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
Comment 3 Frank Schönheit 2005-02-28 14:24:36 UTC
as an externally-caused issue, it's unlikely that OOo can fix this for 2.0
Comment 4 alex.thurgood 2005-08-23 21:59:27 UTC
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
Comment 5 paulwolstenholme 2005-09-01 23:04:37 UTC
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.
Comment 6 amesates 2010-11-11 03:37:13 UTC
Created attachment 74172