Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: please confirm something (jdbc)

Re: please confirm something (jdbc)

From: Ramon F Herrera <ramon_at_conexus.net>
Date: Thu, 29 Nov 2007 08:39:39 -0800 (PST)
Message-ID: <a8970958-c387-4ed2-9aae-6d9e48bc386b@x69g2000hsx.googlegroups.com>


On Nov 28, 3:03 pm, "stc" <slowtraincom..._at_softhome.net> wrote:
> I've been googling for hours now and what I've found out is that there's
> just no way to use the same code for handling BLOBs in Oracle and other
> databases. Am I wrong?
>
> All examples I've come across suggest that one should cast
> java.sql.ResultSet to oracle.jdbc.driver.OracleResultSet when retrieving
> oracle.sql.BLOB objects and using streams (or put/get bytes) to read from or
> write to BLOBs.
>
> There are methods in java.sql.PreparedStatement and java.sql.ResultSet
> (get/set blob, get/set bytes, get/set binary stream) but they're not working
> for me.
>
> I'm using Oracle 9i database and ojdbc14.jar that contains Oracle JDBC
> driver for Java 1.4 and beyond. So technically I could use Oracle JDBC
> classes and write database-specific code but I would like to write code that
> would work OK if I ever switch to DB2 or PostgreSQL.

I tried JDBC and gave up. It's too darn slow for any non-trivial task. All those layers and generality affect the performance. The same can be said about ODBC.

-Ramon (a former JDBC user) Received on Thu Nov 29 2007 - 10:39:39 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US