Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: JDBC/Oracle8 Binary Data
Haresh,
You have to stream the blob into a long or long raw datatype in the database. When you download the JDBC drivers from Oracle, there is an example program in the samples\oci7\ directory named StreamExample.java. We used this example using the Thin driver. I'm sure it can be used with Oracle 8. I believe it is discussed in the documentation that comes with the drivers as well.
Thanks,
Lee Usher
Haresh Assumal wrote:
> Can JDBC get a 'blob' or a 'long' Oracle datatype? I want to insert very
> large strings > 4000 chars long into a table. I thus cannot use VARCHAR2 and
> need to use LONG or BLOB in Oracle. My question is how do I use JDBC to
> insert such a datatype?
>
> I use setInt() or setString() and getInt() or getString() in JDBC is there
> any setBlob()/setLong() or getBlob() in JDBC?
>
> Any help would be much appreciated. Thanks in advance.
> -Haresh
> E-mail: assumal_at_sprynet.com
Received on Wed Mar 11 1998 - 00:00:00 CST