🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.sql
Article #11108

Java insert InputStream nto BLOB field

#11108
From: Galo Alcolea
Date: Thu, 12 Dec 2002 23:33
20 lines
1593 bytes
Hello
I need to introduce an InputStream coming from an attachment of a mail
message in a type field BLOB, but it is I impossible. Could they help me?
This code this well?

filename=parte.getFileName();
streamFichero=parte.getInputStream();
            try
            {
            inserta="INSERT INTO ANEXOS (NUM,ANEXO,NOMBRE) VALUES
("+indice_anexo+","+streamFichero+",'"+filename+"')";

            insertar.execute(inserta); insertar.execute("COMMIT");
            }
            catch (SQLException c)
            {
              error(c.getMessage());
            }

Thank you
Technical Details
Message-ID: <atb6h0$1209mv$1@ID-146066.news.dfncis.de>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-01!sn-xit-09!supernews.com!diablo.theplanet.net!diablo.netcom.net.uk!netcom.net.uk!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!213-96-125-230.uc.nombres.ttd.ES!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 114a0e,3d95d01d14a0b807,start
X-Google-Attributes: gid114a0e,public
X-Google-ArrivalTime: 2002-12-12 15:36:06 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-01!sn-xit-09!supernews.com!diablo.theplanet.net!diablo.netcom.net.uk!netcom.net.uk!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!213-96-125-230.uc.nombres.ttd.ES!not-for-mail
From: "Galo Alcolea" <galcolea@teleline.es>
Newsgroups: borland.public.interbase.sql
Subject: Java insert InputStream nto BLOB field
Date: Fri, 13 Dec 2002 00:33:39 +0100
Lines: 22
Message-ID: <atb6h0$1209mv$1@ID-146066.news.dfncis.de>
NNTP-Posting-Host: 213-96-125-230.uc.nombres.ttd.es (213.96.125.230)
X-Trace: fu-berlin.de 1039736160 35661535 213.96.125.230 (16 [146066])
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4920.2300
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4920.2300