When modifying a column of datatype VARCHAR_IGNORECASE in BASIC using the Acess2Base field.value property, the error "Error #12 (Variable not defined) occurred at line 776 in Field.setValue" is displayed.
Steps to Reproduce:
1.In BASIC, attempt to modify the value property of an Access2Base field object whose Base datatype is VARCHAR_IGNORECASE
The message "Error #12 (Variable not defined) occurred at line 776 in Field.setValue" is displayed
The field value should change without any error messages
User Profile Reset: No
Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug.
(Please note that the attachment will be public, remove any sensitive information before attaching it.
See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
Created attachment 143497 [details]
Sample macro that demonstrates the bug
The sample database contains a single procedure, which demonstrates the bug when attempting to update the value of the VARCHAR_IGNORECASE field test_varchar_ignorecase in the table tblTest.
Sample document attached as requested
Confirmed using Ubuntu 18.04 and LibO 6.0.5
The author of acess2base offered a work around and a patch on a form post about this. https://forum.openoffice.org/en/forum/viewtopic.php?f=47&t=61447&start=30#p448899
Jean-Pierre Ledure committed a patch related to this issue.
It has been pushed to "master":
Access2Base - tdf#118680 Fix VARCHAR_IGNORECASE error
It will be available in 6.2.0.
The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
Affected users are encouraged to test the fix and report feedback.
Access2Base checks the content of the Precision property (https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1sdbcx_1_1Column.html#a20390f2d88c0849fd6cd9d115f502e3a) of the com.sun.star.sdbcx.Column service to know the maximum allowed string length and reports an overflow error if the maximum length is exceeded.
For VARCHAR fields the Precision property contains a non-zero value, typically 2^31), while it contains 0 for VARCHAR_IGNORECASE fields.
A patch has been pushed (https://gerrit.libreoffice.org/gitweb?p=core.git;a=commit;h=7ea081d9f7938c59b1f71399bf32ce3fb738ad66) on master to avoid a test on the field maximum length when the maximum length is undefined (i.e. Precision = 0).
*** Bug 121424 has been marked as a duplicate of this bug. ***