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

--- Comment #15 from Lionel Elie Mamane <[email protected]> ---
(In reply to Julien Nabet from comment #14)
> (In reply to Lionel Elie Mamane from comment #10)
> > ...
> > That select/case statement will need to be extended with new case clause(s)
> > for DECIMAL and NUMERIC. OPreparedStatement::setObjectWithInfo around line
> > 603 contains code that deals with DECIMAL/NUMERIC values.
> 
> The main pb is we don't have sqlType here so "if(sqlType ==
> DataType::DECIMAL || sqlType == DataType::NUMERIC)" isn't possible

You probably have to add cases for
SQL_SHORT
SQL_LONG
SQL_FLOAT
SQL_DOUBLE
SQL_D_DOUBLE
SQL_INT64

> Then which scale value should we use here (since there's no "scale" arg)
> for this line:
> for(sal_Int32 i=sValue.copy(sValue.indexOf('.')+1).getLength(); i<scale;i++)

Err... Just convert the string to a number (integer or float, depending on the
SQL_foo type) and call the corresponding setFloat/setDouble/setLong/...? In
these cases, the

if (str.getLength() > pVar->sqllen)
    str = str.copy(0, pVar->sqllen);

will (I think) also do the wrong thing.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to