Hi Chester,

    See the "LOBs" section and exercises in my tutorial "JDBC 2.0
Fundamentals" at

<http://java.sun.com/developer/onlineTraining/Database/JDBC20Intro/JDBC20.ht
ml>

    It shows the way things *should* work and do work on DB2 for both NT and
the AS/400.  As befitting, I guess, a non-standard "data type", different
databases have their own quirks.  In the past, and maybe still, Oracle, for
example, wanted an empty row inserted first, then the blob could be updated.
In addition, some databases limited the default size to 2K unless you took
specific action, so be sure to check your documentation if ResultSet's
setBinaryStream() or setBytes() doesn't work initially.

    JDBC 3.0 and JDK 1.4 also added these methods to the Blob interface.


                                                         Joe Sam

Joe Sam Shirah -        http://www.conceptgo.com
conceptGO         -        Consulting/Development/Outsourcing
Java Filter Forum:       http://www.ibm.com/developerworks/java/
Just the JDBC FAQs: http://www.jguru.com/faq/JDBC
Going International?    http://www.jguru.com/faq/I18N
Que Java400?             http://www.jguru.com/faq/Java400


----- Original Message -----
From: "Chester Chen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 16, 2003 11:40 AM
Subject: How to create a BLOB field with JDBC using thin driver


> Hi,
>    I am trying to use a BLOB to store some binary data and wonder how to
do
> this in JDBC.
>    I have search the java.sun.com site, oracle and google sites and did
not
> find any thing useful.
>
>
>    The JDBC API tutorial reference book only give examples to update BLOB,
> i.e. you read BLOB from database
> and then setBLOB to update it.
>
>    I have found any example to show me how to create an new BLOB record,
has
> any done this before ?
>
> Chester
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to