Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: storing image (gif) in Oracle

Re: storing image (gif) in Oracle

From: Tom Zamani <tomz_at_redflex.com.au>
Date: Tue, 15 Aug 2000 18:40:55 +1000
Message-ID: <8navqt$mtm$1@perki.connect.com.au>

If you are using oracle 8X then use lob datatype, and there is a package called dbms_lob which has got all the functions you need. Tom
<tcblue82_at_my-deja.com> wrote in message news:8n12r1$k8k$1_at_nnrp1.deja.com...
> Hi,
> I'm having lots of trouble finding information on how to store binary
> data in oracle. All I can find is text that tells me i can use the
> Long Raw datatype to store images, music, etc. but not how to do that.
> Ok so I am using perl to store things, and i have the following DB
> statements:
>
> $sth = $shipping->DB->dbh->prepare("UPDATE SHIPPING SET GIF_LABEL = ?
> WHERE SHIPPING_ID = ".$shipping->id
> ) || die $shipping->DB->dbh->errstr;
> $sth->execute($gif_label) || die "At execute: ".$sth->errstr;
>
>
> Basicaly it is this below:
> UPDATE SHIPPING SET GIF_LABEL = $GIF_DATA WHERE SHIPPING_ID = 4;
>
> where $GIF_DATA is my gif binary gif data (this works because i can
> print out the gif on the screen using a gif header so i know the data
> is valid.) OK, this DOES NOT WORK. I am however able to store, say
> something like 'a', '2', but not 'abc23'. So Would it be something
> with my setup? I created the column with as a (COLUMN_NAME LONG RAW).
> If any one has any examples on how to store image data in oracle or any
> ideas on what could be wrong with my code or setup Please email me or
> reply to this Post. Thanks!
>
> -Pat-
> tcblue82_at_yahoo.com
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Tue Aug 15 2000 - 03:40:55 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US