Bug 79026 - Content of memo fields in MS Access tables get truncated in LibreOffice Base forms.
Summary: Content of memo fields in MS Access tables get truncated in LibreOffice Base ...
Status: NEEDINFO
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Database (show other bugs)
Version: 4.2.4.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-21 17:13 UTC by Albrecht Müller
Modified: 2015-01-04 10:43 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Albrecht Müller 2014-05-21 17:13:56 UTC
Steps to reproduce:

Create a new database that refers to some MS Access database. This database should contain a table with a memo-field, i.e. a column where you can enter text which can contain much more than 255 characters. There should be entries containing more than 255 characters. Using the form assistent create a form to access this table. I simply created a form containing all fields of the table. Save the form an open it. Navigate to some record whose memo field contains more than 255 characters.


Current behavior:

The content of the memo field is truncated to about 255 characters.  This seems to depend of the wrap around feature of the control showing the memo field. If no wrap around is selected the content is truncated to less than 255 characters. Seems to be truncated to 255 characters, and then the CR/LF sequences are deleted.

Due to the amount of data a memo fields can contain this behavior can cause substantial loss of data! It is especially dangerous as the form seems to detect that the content of the control is not the same as the corresponding content in the table and therefore offers to store the content despite the fact that the user did not change it.

The table view shows the full content of the memo field. Therefore the problems seems to be related to the form.


Expected behavior:

The control should show the complete content of the memo field (more than 255 characters).


Platform: 
LibreOffice 4.2.4.2 german, Windows 7
Comment 1 Alex Thurgood 2014-05-21 17:39:34 UTC
Hi Albrecht,

Do you have a Database > Advanced Properties context menu when you right mouse button click on a table in the main ODB window ? This might be database type dependent, I don't remember anymore.

If you do have access to such a menu entry, you should be able to set the form to not verify that the data entered in the form corresponds to that required for the bound fields. Untick that box, and see whether that changes anything.

If not, this does sound like a duplicate of a previous bug entry, but I don't have the number to hand.

Alex
Comment 2 Alex Thurgood 2014-05-21 17:42:36 UTC
Maybe the problem here is similar/same, and perhaps specific to Windows :

https://bugs.freedesktop.org/show_bug.cgi?id=65644
Comment 3 Albrecht Müller 2014-05-22 11:18:14 UTC
Hi Alex,

After I switched the user interface language to English (UK) I found:
right click to some object (can be a table or a form) -> Database -> Advanced Settings -> Form data input checks for required fields.

The corresponding check box was checked and I unchecked it.

I was not able to notice a difference. When I close a form showing truncated content I sometimes get a dialog box asking me I a want to save the changed record. I have got the impression that this message does not appear if I just navigated to some record containing truncated content. If I had set the focus into the control containing the truncated content (without changing anything) the dialog appears when I close the form. It is complicated to assess when changes to the database occur as the table view seems not to reflect these changes immediately, i.e. I have to close and reopen the table view if want to see current content of database.

I don't think this is a duplicate of 65644 as this bug is related to version LibreOffice 4.0.3.3.
My problem in related to Access 97 databases, and to my knowledge the Access2Base feature is not included in versions before 4.2. (see http://www.access2base.com/access2base.html) Using previous versions I had no easy way to connect to MS Access databases.

The behavior of this bug seems to have changed between versions 4.2.3.3 and 4.2.4.2: In version 4.2.3.3 memo fields were truncated in the table view. In 4.2.4.2 the table view shows the full content. (I don't have 4.2.3.3. installed now therefore I cannot verify this observation again). Both versions are unable to display the full content in forms.

I think this bug is really dangerous as it makes it very easy to inadvertently destroy database content.

Albrecht
Comment 4 Beluga 2014-11-24 11:58:42 UTC
Albrecht: can you test with 4.3 and 4.4 beta and report your results here? Change back to UNCONFIRMED, if the problem persists. Change to RESOLVED WORKSFORME, if the problem went away.
Comment 5 Albrecht Müller 2014-11-25 09:51:08 UTC
(In reply to Beluga from comment #4)
> Albrecht: can you test with 4.3 and 4.4 beta and report your results here?
> Change back to UNCONFIRMED, if the problem persists. Change to RESOLVED
> WORKSFORME, if the problem went away.

Tried with Version: 4.3.4.1 Build ID: bc356b2f991740509f321d70e4512a6a54c5f243. Unfortunately this is the only version available to me. 

The behaviour persists. What I did: Using Base, I opened an MS-Access97 database, created some form (I used one that shows a single record per page) on a table containing memo fields, navigated to some record containig a field with content longer than about 255 characters, moved cursor to the end of the field (was careful - tried a avoid changing any content), saw that content was missing, quit the form. Got prompted if I wanted to save the changed content (I did not change anything!), confirmed this, used a MS-Access installation to see that the content is actually truncated. Summary: There is a substantial loss of data.
Comment 6 Beluga 2014-11-25 10:33:16 UTC
Let's set to UNCONFIRMED then.
Comment 7 Alex Thurgood 2014-12-15 15:20:11 UTC
Unless we have a test Access97 file with which to test, it is going to be difficult for any of the qa team to reproduce.
Comment 8 Lionel Elie Mamane 2014-12-16 13:22:41 UTC
What type of control is being used in the form to show? Text box? Formatted field?

Do you use ODBC or ADO to connect to the .mdb file?

(If you attach the .odb file, that would be nice.)

(In reply to Albrecht Müller from comment #3)
> My problem in related to Access 97 databases, and to my knowledge the
> Access2Base feature is not included in versions before 4.2.

Access2Base is only about running Basic macros, that's unrelated to accessing *data* in .mdb files. The latter is available since OO.org times.
Comment 9 Alex Thurgood 2015-01-03 17:41:05 UTC
Adding self to CC if not already on
Comment 10 raal 2015-01-04 10:43:35 UTC
(In reply to Alex Thurgood from comment #7)
> Unless we have a test Access97 file with which to test, it is going to be
> difficult for any of the qa team to reproduce.
Hello Albrecht,

Please send us a sample document, as this makes it easier for us to verify the bug. 
I have set the bug's status to 'NEEDINFO', so please do change it back to 'UNCONFIRMED' once you have attached a document.
(Please note that the attachment will be public, remove any sensitive information before attaching it.)
How can I eliminate confidential data from a sample document?
https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F
Thank you


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.