Hi Frank,

Am Donnerstag, den 28.08.2008, 13:56 +0200 schrieb Frank Schönheit - Sun
Microsystems Germany:
> Hi Fernand,
> 
> > I'm sure *Frank* can help with the details of connecting a stream to a
> > database column ...
> > 
> > Can you help me Frank :-)
> 
> in general,
>   oForm.Columns.getByName( "your_column_name" ).updateBinaryStream( _
>     oTheStream, nBytesInStream )
> should do.
> 
> Which leaves you with
> - obtaining the stream (which must be an XInputStream)
>   I suppose you already have one, created from the URL which you
>   stored your image to. Yes?
> - obtaining the number of bytes in the stream
>   (who the heck invented this API where you need to specify the size
>   at caller side? Why not just let the implementation read all the bytes
>   which are there.)

This *may* be something like the documentation bug there was talk about
once upon a time. You wrote:

<cite>
Hi Matthias,

> ....
> The only conclusion I can draw from such an inconsistent API is that any
> implementation that claims to be usable can only ignore the 'Length'
> argument.
> ....
> Probably only 'setBinaryStream()' documentation (and implementation?)
> need to be fixed to clarify 'Length' as 'Limit'.

I fully agree, and I'll file an issue to adjust the documentation as
well as the implementations.


Ciao
Frank

-- 
Frank Schönheit                                mailto:[EMAIL PROTECTED]
Software Engineer                             http://www.openoffice.org
OpenOffice.org database access                http://dba.openoffice.org
OpenOffice.org common user interface           http://ui.openoffice.org
</cite>

Sorry, no direkt link or issue number, but search the archives of
[EMAIL PROTECTED] for threads with the speaking subjects:

Subject: [api-dev] >:(
Subject: Re: [api-dev] Re: [ucb-dev] >:(

And while were at it I'd like to ask:
Does PreparedStatement.setBinaryStream(number, stream) (it is
XParameter.setBinaryStream actually, unified in BASIC) expect an input
stream implementing XSeekable, like the document loader does?

For me it blocks, except when using dbase as backend...

HTH,
Marc



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

Reply via email to