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

Julien Nabet <serval2...@yahoo.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Whiteboard|target:7.3.0.2 target:7.2.6 |

--- Comment #10 from Julien Nabet <serval2...@yahoo.fr> ---
Just rethinking about all this.
I'm more accustomed to this kind of request:
SELECT * FROM "Table1" WHERE "Name" = :name OR "Name" IS NULL
putting "Rob", I got 2 lines (the one with "Rob" + the one with nothing)
putting nothing, I got only the line which contains nothing.
Seems ok to me.

If taking yours:
1) I noticed LO considers there 2 parameters (whereas there's only 1) as this
part of bt shows:
#0 
dbtools::setObjectWithInfo(com::sun::star::uno::Reference<com::sun::star::sdbc::XParameters>
const&, int, connectivity::ORowSetValue const&, int, int)
    (_xParams=uno::Reference to (dbaccess::OPreparedStatement *) 0x5c91490,
parameterIndex=2, _rValue=..., sqlType=12, scale=0) at
connectivity/source/commontools/dbtools.cxx:1782
#1  0x00007ff09dafab50 in
dbtools::setObjectWithInfo(com::sun::star::uno::Reference<com::sun::star::sdbc::XParameters>
const&, int, com::sun::star::uno::Any const&, int, int)
    (_xParams=uno::Reference to (dbaccess::OPreparedStatement *) 0x5c91490,
parameterIndex=2, x=uno::Any("string": "Rob"), sqlType=12, scale=0) at
connectivity/source/commontools/dbtools.cxx:1773
#2  0x00007ff0932ea1b0 in dbaccess::ORowSet::impl_prepareAndExecute_throw()
(this=0x5853ac0) at dbaccess/source/core/api/RowSet.cxx:1681
#3  0x00007ff0932e5a34 in
dbaccess::ORowSet::execute_NoApprove_NoNewConn(osl::ResettableGuard<osl::Mutex>&)
(this=0x5853ac0, _rClearForNotification=...) at
dbaccess/source/core/api/RowSet.cxx:1806
#4  0x00007ff0932e4dbd in dbaccess::ORowSet::execute() (this=0x5853ac0) at
dbaccess/source/core/api/RowSet.cxx:1565
#5  0x00007ff088730610 in
frm::ODatabaseForm::executeRowSet(osl::ResettableGuard<osl::Mutex>&, bool,
com::sun::star::uno::Reference<com::sun::star::task::XInteractionHandler>
const&)
    (this=0x5fa8f00, _rClearForNotifies=..., bMoveToFirst=true,
_rxCompletionHandler=empty uno::Reference) at
forms/source/component/DatabaseForm.cxx:1141
#6  0x00007ff088738fcc in frm::ODatabaseForm::load_impl(bool, bool,
com::sun::star::uno::Reference<com::sun::star::task::XInteractionHandler>
const&)
    (this=0x5fa8f00, bCausedByParentForm=false, bMoveToFirst=true,
_rxCompletionHandler=empty uno::Reference) at
forms/source/component/DatabaseForm.cxx:2845
#7  0x00007ff08873a1c5 in frm::ODatabaseForm::load() (this=0x5fa8f00) at
forms/source/component/DatabaseForm.cxx:2608
#8  0x00007ff08d1c1a4b in
dbaui::SbaXDataBrowserController::reloadForm(com::sun::star::uno::Reference<com::sun::star::form::XLoadable>
const&)
    (this=0x5e3b9f0, _rxLoadable=uno::Reference to (frm::ODatabaseForm *)
0x5fa9198) at dbaccess/source/ui/browser/brwctrlr.cxx:604
#9  0x00007ff08d31973c in
dbaui::SbaTableQueryBrowser::implLoadAnything(rtl::OUString const&,
rtl::OUString const&, int, bool,
utl::SharedUNOComponent<com::sun::star::sdbc::XConnection,
utl::DisposableComponent> const&) (this=0x5e3b9f0,
_rDataSourceName="file:///tmp/Firebird_Parameter.odb",
_rCommand="Query_parameter_IS_NULL", nCommandType=1, _bEscapeProcessing=true,
_rxConnection=...)
    at dbaccess/source/ui/browser/unodatbr.cxx:2380
#10 0x00007ff08d315c0a in
dbaui::SbaTableQueryBrowser::implSelect(weld::TreeIter const*) (this=0x5e3b9f0,
pEntry=0x5cb8780) at dbaccess/source/ui/browser/unodatbr.cxx:2677
#11 0x00007ff08d318e18 in dbaui::SbaTableQueryBrowser::implSelect(rtl::OUString
const&, rtl::OUString const&, int, bool,
utl::SharedUNOComponent<com::sun::star::sdbc::XConnection,
utl::DisposableComponent> const&, bool) (this=0x5e3b9f0,
_rDataSourceName="file:///tmp/Firebird_Parameter.odb",
_rCommand="Query_parameter_IS_NULL", nCommandType=1, _bEscapeProcessing=true,
_rxConnection=..., _bSelectDirect=true)
    at dbaccess/source/ui/browser/unodatbr.cxx:2444
#12 0x00007ff08d31e4b7 in dbaui::SbaTableQueryBrowser::impl_initialize()
(this=0x5e3b9f0) at dbaccess/source/ui/browser/unodatbr.cxx:3250
#13 0x00007ff08d285c42 in
dbaui::OGenericUnoController::initialize(com::sun::star::uno::Sequence<com::sun::star::uno::Any>
const&) (this=0x5e3b9f0, aArguments=uno::Sequence of length 14 = {...})
    at dbaccess/source/ui/browser/genericcontroller.cxx:259

2) is it expected that for the second parameter LO goes into
OPreparedStatement::setString but retrieves dType (which is equal to
pVar->sqltype & ~1) to SQL_NULL ?

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to