Re: JDBC driver writes binary data ONLY as Large Object

Поиск
Список
Период
Сортировка
От Bill
Тема Re: JDBC driver writes binary data ONLY as Large Object
Дата
Msg-id 3989CBE8.1BBF9535@cplane.com
обсуждение исходный текст
Ответ на RE: JDBC driver writes binary data ONLY as Large Obj ect  (Peter Mount <petermount@it.maidstone.gov.uk>)
Список pgsql-interfaces
Peter Mount wrote:

> Hmmm, I see your point. There must be some way of encoding the string so
> that the data is stored correctly. I know certain control characters can be
> stored (cr/lf's etc) as I have a PHP script that does it here.
>
> Is it the new String(bytes[]) bit that barfs, or is it that the data is
> mungled when it's re-read from the table?

-------------------------------------------
java.sql.SQLException: ERROR:  parser: parse error at or near ""
       at org.postgresql.Connection.ExecSQL(Connection.java, Compiled Code)       at
org.postgresql.jdbc2.Statement.execute(Statement.java,Compiled Code)
 
       at org.postgresql.jdbc2.Statement.executeUpdate(Statement.java:73)       at
org.postgresql.jdbc2.PreparedStatement.executeUpdate(PreparedStatement.java:126)

-------------------------------------------

Perhaps we can look at the ResultSet.getBytes() and just do the inverse of
that?  Though I haven't tested if getBytes() is doing the right thing yet,
either.
In the end I need to be able to store/retrieve the data through both JDBC and
ODBC interface.  This is working now if I store all binary data as Large
Objects.  But most of my blobs of binary are only 200-2000 bytes long.  I
assume it is much less efficient to store such small blobs as LOs?   That is,
assuming the driver code is written well.  So that may not be true with the
current JDBC driver given that it would first have to convert the binary
blob into a String. 8^(

Bill



В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Lamar Owen
Дата:
Сообщение: Re: Re: And Furthermore. Was: PSQL Working, but PGAccess Not Connecting.
Следующее
От: Craig Orsinger
Дата:
Сообщение: RE: ODBC driver on NT client