Libre form over MySQL limiting number of characters in text filed.

Hi,

I've got an odd result coming from a test drive DB I'm using OpenLibre to front end.

DB is MySQL 5.5 using current MySql native driver on Server 2003 with base being installed locally same machine.
Libre Base attaches to a small, simple table configured like the Libre canned "Employees" table.
It has a PK plus a fields of pchar, 50 characters wide, built in MySql using workbench initially.

I generated a duplicate query in base over top of the table.
Created a form over the query
Was pleased to see it operated as expected.

But then...

During edits of records within the form I discovered any prior entry which had X characters used in the form, would not permit other records to have any greater number of characters than the prior smallest used characters. The problem appears only to happen in the form tool. I can edit, add or delete in query or table with no problem.

If I edit the earliest smallest text entry in table view to hold 30 characters, the form cannot enter or edit any more than thirty characters on subsequent records. If I again alter the earlier smallest field record to 5 characters, once again the form only permits 5 characters on subsequent records.

I've looked for a configuration issue that might affect it, but it puzzles me since table and query operations work fine, why the form would adopt such an odd behavior.

Anyone able to offer a suggestion what to look for to solve this. My efforts to search for a solution have come up empty so far.

Thank you in advance,

Mike

Mike,
Are you using VARCHAR as the data type in the table definition (table edit mode: Text [VARCHAR] )?
If so, what is the "Length" set to at the bottom of the table edit dialog for the field?
In the form edit mode, what is the "Max Text Length" property for the field?

Note that these two lengths can be different. My version has other text data types, such as Text[ENUM], Text[SET], Text (fix) [CHAR]. I am not familiar with any of these, but if your database is set to any of them, it may be the problem. I believe VARCHAR max is 255 characters, but you can limit that with the length settings in Base tables & forms. I just checked one of my forms and discovered the limit for my "Notes" field, which is 255 characters max, is set to 0 (zero). According to the help, this property setting gets the length from the database (MySQL?) as long as it was never changed (set, or defined).

Note that I am using MySQL 5.5.29 under Linux 3.2.29 and LO 3.6.7.2 at the current time. I do not have this problem with my numerous databases, nor did I have it with previous versions of MySQL or LO. I have always been able to add to a text field up to the 255 character MySQL limit, no matter which record. When I get to the limit, Base will not allow me to enter any more characters until I delete some elsewhere to make room for the new characters. That is better than getting a MySQL error when the record is saved. So, it should work for you.

Hope this helps.
Girvin Herr

Hi,

I've looked for a configuration issue that might affect it, but it puzzles me since table and query operations work fine, why the form would adopt such an odd behavior.

Anyone able to offer a suggestion what to look for to solve this. My efforts to search for a solution have come up empty so far.

The controls of your form are bound to your underlying data source, but they can be configured to have their own attributes (limited formatting options, length, etc). These are properties of the control, and there is a configuration option for the form in general set by default which forces the user to respect those properties.

In any given control, you should set the MaxTextLength property to 0 - this tells the control to take the length defined in the underlying database. Additionally, you can try unsetting the Advanced properties option in the database by right mouse button clicking on any of the table, query, or report entries and choosing Database > Advanced Properties, and unselecting the check that data entry correspond to form definition (I don't have the exact English wording here at the moment, as I'm on a French system).

If these don't work, then it might be a bug, although I haven't encountered this one in a long time (it was something that cropped up in OpenOffice.org several years ago).

Alex