https://bugs.freedesktop.org/show_bug.cgi?id=66171
Priority: medium
Bug ID: 66171
Assignee: [email protected]
Summary: List Boxes don't work for single fields with Mysql
database
Severity: normal
Classification: Unclassified
OS: Linux (All)
Reporter: [email protected]
Hardware: x86-64 (AMD64)
Status: UNCONFIRMED
Version: 4.1.0.1 rc
Component: Database
Product: LibreOffice
I have a MySql database with a Base front end. Some of my listboxes use a
lookup on a single column in a table, such as:
Bound field: 1
Data Field: CurrencyCode
Input required: Yes
List content: SELECT "CurrencyCode" FROM "MyAccounts"."Currency" AS "Currency"
ORDER BY "CurrencyCode" ASC
Type of list content: sql
In 3.5.7 (ubuntu 12.04) this works fine. I previously tried to set the bound
column to 0 (ie the 1st field) but that always gets reset to 1 by Base.
The 'CurrencyCode' column in table 'Currency' table is a 3 character code, and
is the primary key.
With a MySql database, using MySql native connector, on existing valid data, I
get the following error:
"The Contents of a combo box or list field could not be determined"
"index out of range"
Trying to emulate this with an HSQL engine failed, it works as expected, so I
am unable to post a demonstration odb.
I tried changing the list box to use 2 fields in the SELECT statement, as
follows:
SELECT "CurrencyCode", "CurrencyCode" FROM "MyAccounts"."Currency" AS
"Currency" ORDER BY "CurrencyCode" ASC
This works with MySql as well as HSQL, so I have a work-around, but I have to
edit many list boxes to enable me to continue.
I tried placing the single-field sql statement in a Base Query rather than
using sql in the control definition. The query run on its own works. When
used as the source of the list box it gives the same error as above.
To summarise, it appears that there is a problem using a single (text) bound
field in an sql or query lookup from a Mysql database to populate a list box.
Given that I cannot supply a demo, I'm willing to try other experiments if it
would be useful.
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs