Hi Marc,

> Do you see any sense in making a helper service concentrating on this
> kind of tasks?

Hmm. If it's only about converting a numeric into a string - I don't
think so. Besides the LocaleData thingie, you could, for instance, also
use the NumberFormatter: create a NumberFormatter instance, attach the
NumberFormatsSupplier obtained from a data source, and use
convertStringToNumber [1]. There also is a property something (not sure
if at the formatter or the supplier) specifying a locale, IIRC.


> sub doUpdateValue(aRowSet as object, colnum as integer, ntype as
> integer, value)
>       select case ntype
>               case com.sun.star.sdbc.DataType.BIT
>                       aRowSet.updateBoolean(colnum, value)
>               case com.sun.star.sdbc.DataType.INTEGER, _
>                        com.sun.star.sdbc.DataType.SMALLINT, _
>                        com.sun.star.sdbc.DataType.TINYINT, _
>                        com.sun.star.sdbc.DataType.BIGINT
>                       aRowSet.updateInt(colnum, value)
>               case com.sun.star.sdbc.DataType.FLOAT
>                       aRowSet.updateFloat(colnum, value)
> ... and so on and on and on ...

What's wrong with updateObject? [2]

Ciao
Frank

[1]http://api.openoffice.org/docs/common/ref/com/sun/star/util/XNumberFormatter.html#convertNumberToString
[2]http://api.openoffice.org/docs/common/ref/com/sun/star/sdb/XColumnUpdate.html#updateObject

-- 
- Frank Schönheit, Software Engineer         [EMAIL PROTECTED] -
- Sun Microsystems                      http://www.sun.com/staroffice -
- OpenOffice.org Database                   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to