Apache OpenOffice (AOO) Bugzilla – Issue 18488
unable to store images into a PostgreSQL db
Last modified: 2006-05-31 14:29:06 UTC
Hello, I am trying to use OpenOffice.org and a form to store images into a Postgresql 7.3.2 db, connected through psqlodbc 7.03.0100 (the latest for windoze) or unixodbc 2.2.6 (the latest for linux). I am able to DISPLAY previously inserted images on records. But unable to insert new ones. After contacting the postgresql ODBC driver authors, sql logs were sent, and you can read below an excerpt of the last message: > > I guess that openoffice escapes the binary file, in order to to > pass it by value into a SQL statement, as it is recommended for > bytea and for mysql BLOBs. But pg odbc driver expects raw binary > file, not escaped one, for longvarbinary. And postgresql/contrib/lo > also does expect a file name, not a parsed by value. The problem I see in the log you sent is [ODBC][7485][SQLBindParameter.c][186] Entry: Statement = 0x81e39b0 Param Number = 2 Param Type = 1 C Type = -2 SQL_C_BINARY SQL Type = -2 SQL_C_BINARY OpenOffice is binding SQL_BINARY(SQL_C_BINARY seems a unixODBC's bug) SQL Type parameter not an SQL_LONGVARBINARY one. Unfortunately I don't understand the reason. Though I don't love the *bytea* type, you can turn on the *bytea as LO* DSN option. *bytea* is only for not so large objects. regards, Hiroshi Inoue http://www.geocities.jp/inocchichichi/psqlodbc/ http://gborg.postgresql.org/project/psqlodbc/projdisplay.php
correcting sub component and default owner
something for you I think.
set target
.
seems to be fixed in cws oj08
change subcomponent to 'none'
fixed.
set to fixed
verify in CWS oj08
Hi, fixed in current developer build -> close. The current developer build can be found at http://download.openoffice.org/680/index.html Feel free to reopen if this issue is not fixed in the developer build. Bye Marc