Public bug reported:
Binary package hint: openoffice.org
Using prepared statement with updateBinaryStream method of
OpenOffice.org UNO, fails to load a binary file larger than 256k when
OpenOffice.org connects using Native MySQL Driver (SDBC) 1.0.1.
Consider the following code in OOBASIC:
--------------------------------------
' The Form Document has 2 data forms with one to many relationship.
' The fpath$ is the full path to binary file I like to insert in the table
' The sdate$ is a date in MySQL format like "20101025" for Oct 25 2010
Sub insertBinFile(fpath$,sdate$)
Dim oF2
oF2=ThisComponent.DrawPage.Forms(0).getByName("SubForm")
stream=createUnoService("com.sun.star.ucb.SimpleFileAccess").openFileRead(convertToURL(fpath$))
oF2.movetoinsertrow
' No need to update the first (1) field because is the foreign key to
first database form in the document.
oF2.updateDate(2,StringToUNODate(sdate$))
oF2.updateString(3,filenameoutofpath(fpath$))
oF2.updateBinaryStream(4,stream,stream.Length)
oF2.insertRow
oF2.reload
End Sub
------------------------------------------------
The program ends with a runtime error:
An exception occurred
Type: com.sun.star.sdbc.SQLException
Message: Incorrect Arguments to mysqld_stmt_execute.
The same code works with ODBC Connection. It also works with SDBC
Connection on Windows. So I think is a SDBC problem on Ubuntu.
I'm using Ubuntu 10.10 with OOo, MySQL Server and MySQL Native Driver
from the official repositories.
** Affects: openoffice.org (Ubuntu)
Importance: Undecided
Status: New
** Tags: mysql openoffice.org sdbc
--
MySQL Native driver for OpenOffice.org can not load Binary files using prepared
statements
https://bugs.launchpad.net/bugs/665710
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs