plsease try:

1?SqlString = "INSERT INTO yourtablename(Image) VALUES(empty_blob())";

2?  SqlString = "select Image from yourtablename";
        rset = Sql.stmt.executeQuery(SqlString);
        if (rset.next())
        {
          BLOB Picture = ((OracleResultSet)rset).getBLOB ("Image");
          OutputStream PictureStream = Picture.getBinaryOutputStream();
          PictureStream.write(ImageByte);
          PictureStream.close();
        }
         rset.close();

ps:
    At first you must get the ImageByte. You can get it from Image file
    ( like:
    InputputStream  baoss = new InputStream();
    OutputStream pr = new BufferedOutputStream(new FileOutputStream(file));
    pr.write(xxxxxx);
    pr.close();
    baoss.close();
    }
Also, you can get it through other way.


Hope you Succed!


----- Original Message -----
From: "Christian Hamann Linares" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 28, 2000 9:39 AM
Subject: Help!!!!!!!!!!!


> Hi All
> I have a Problem.. i hava a Oracle DataBase and i dont know how insert
> images with java.. what do i have to do?
> besides.. i have to show these pic in my web page and i dont know how...
> please help me11
>
> atte
>
> Christian Hamann Linares
> Area de Desarrollo de Aplicaciones
> FICS-DATA USMP
> e-mail: [EMAIL PROTECTED]
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to