Hey!

Josep this is not the forum for asking this question.  This E-list is for
Servlet issues only. But if you are using DB2 UDB and your JPEG is located in
the file system accessible to the servlet, then try this:

Create a comma delimited file named lod_lob like this:

1,"a link","a description", something.jpg

Then Create a DB2 command file (or in your code) and 'load from lob' like this:

update command options using
       l on load_lob.log
       r on load_lob.out;
------------------------------------------;
-- Load LOBs into Table YOURTABLE ;
------------------------------------------;
connect to josep_db;
load from lob_in of del
     lobs from c:/lobs
     modified by lobsinfile
     method p(1,2,3,4)
     messages load_lob.msg
     insert
     into table1
    (id_pais
        ,link
        ,descripcio
        ,picture);

Sans adieu,
Danny Rubis


Josep Curto wrote:

> Hi,
>
> I use a servlet to UPDATE a BD (mySQL) trough JDBC . All works fine with SQL
> strings like : INSERT INTO table1 (id_pais,link,descripcio) VALUES (1,"a
> link","a description")
> But now, I want to INSERT into the DB a BLOB FIELD with BINARY DATA (really
> is the data of a JPG file).
> I can't make a SQLstring with binary data for the executeQuery(String)
> method of my Statement.
> How can I solve that ?
>
> thanks in advance,
>
> -----------------------------
> Josep Curto
> [EMAIL PROTECTED]
> -----------------------------
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to