Moin Frank,
Am Dienstag, den 02.09.2008, 21:59 +0200 schrieb Frank Schönheit - Sun
Microsystems Germany:
> Hi Marc,
>
> > Using dbase I succeeded in writing othe train to ut a doc this way, for
> > mysql or hsql the office hangs. See some code below, maybe the
> > limit-argument is the problem, which I set to 65536 as a limit and the
> > document was anytime smaller than that on storage (~30kB).
>
> it might ... The length argument is used for XInputStream.readBytes (in
> some cases, for XInputStream.readSomeBytes, which I consider a bug), and
> though the API definition says the method should return in case of EOF,
> there might be a bug somewhere that it blocks in this case.
There must be something ... I tried:
- setting the limit to the exact file size, 6957 Bytes (fetched from the
document info dialog manually) the writing blocks
- setting it to one less (counting from zero) it blocks
- setting to 4096 does actually write and *not block* *but* it writes
exactly 4096 Bytes - the document inside the table is truncated
> > <code>there is
> > ...
> > sql = "INSERT INTO ""pieces"" (""ID"", ""piece"") VALUES (?, ?)"
> > oPStatement = aConnection.prepareStatement( sql )
> > oPStatement.setInt(1, aID)
> >
> > dim Args(0) as new com.sun.star.beans.PropertyValue
> >
> > oPipe = CreateUNOService("com.sun.star.io.Pipe")
> > Args(0).Name = "OutputStream"
> > Args(0).Value = oPipe ' s.u.
> >
> > ' order IS IMPORTANT !!! for dbase ...
> > tmpDoc.storeToUrl("private:stream", Args())
> >
> > ' never-come-back-call ...
> > oPStatement.setBinaryStream(2, oPipe, 65536)
> >
> > oPStatement.executeUpdate()
> >
> > </code>
>
> Will try to reproduce. As always, an issue is highly welcome, and might
> speed up things :)
Will do when finished collecting the facts.
Marc
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]