https://bugs.freedesktop.org/show_bug.cgi?id=86852

            Bug ID: 86852
           Summary: Query: Parameter-dialog should submit NULL instead of
                    empty string, if there is no input.
           Product: LibreOffice
           Version: Inherited From OOo
          Hardware: Other
                OS: All
            Status: UNCONFIRMED
          Severity: minor
          Priority: medium
         Component: Database
          Assignee: libreoffice-bugs@lists.freedesktop.org
          Reporter: rob...@familiegrosskopf.de

Created attachment 110228
  --> https://bugs.freedesktop.org/attachment.cgi?id=110228&action=edit
Lokk a the difference between query and form - both use the same query

Open the attached database. Have a look to the table. It contains 10 rows with
data, but much some of the fields don't contain any value.
There is a query with two parameters. Execute the query whitout filling any
content to the parameters: 4 rows would be shown.
Now open the form. The form contains a subform, which works with the same
query. The fields in the mainform should be empty. Press the button "Search".
The same query in the form shows 10 rows, outside the form it shows 4 rows.

Let's have a look at a part of the code of the query:
SELECT * FROM "Table" WHERE ( LOWER ( "Firstname" ) LIKE LOWER ( :qfirstname )
|| '%' OR :qfirstname IS NULL )
The problem is the definition of "OR :qfirstname IS NULL". Fields in a form
will give NULL to a field of a table, if there isn't any content written. So
the paramter could be NULL, if it is started by a query inside a form.
The dialog for parameter-input won't set NULL to an empty parameter. It will
set an empty string instead. So the second condition couldn't be reached.

Queries shouldn't work different inside or outside a form.
Input of values in a form shouldn't work different to input of values through a
dialog. So the dialog for paramters should submit NULL instead of an empty
string.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to