[Libreoffice-bugs] [Bug 143656] Direct SQL: Queries in Tools → SQL and macro give wrong results - direct SQL works well

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Aug 3 16:11:09 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=143656

Lionel Elie Mamane <lionel at mamane.lu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|1                           |0
             Status|NEW                         |UNCONFIRMED

--- Comment #9 from Lionel Elie Mamane <lionel at mamane.lu> ---
(In reply to Robert Großkopf from comment #0)

> Expected behavior: Query_direct_SQL should show the same content as Tools →
> SQL and queries in a macro.

No, that's not the documented behaviour. In the macro, to disable escape
processing (that is, to do the query as "direct SQL"), insert a line

        oSQL_Statement.EscapeProcessing = False

after

        oSQL_Statement = oConnection.createStatement()

but before

        oResult = oSQL_Statement.executeQuery(stSql)

As to "Tools/SQL", it would be useful to have in this dialog a checkbox to
enable/disable escape processing, too. The UI can present it as "Run SQL
command directly" to be consistent with the Query Design UI.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210803/46e348e8/attachment.htm>


More information about the Libreoffice-bugs mailing list