Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: blob insertion
Kenneth,
Here's an exaple procedure I wrote in an Oracle 8.1.5 database to import
images (jpegs, bmps, gifs, etc.). The table inserted into is called
IMGADDENDSTORE and is defined as:
ITEMID NUMBER(10)
BLOB_ITEM ORDSYS.ORDImage
Here's the code from the procedure:
PROCEDURE "SP_LOADIMGADDENDSTORE" (item IN NUMBER,
filename IN CHAR,
itemtype IN CHAR)
AS
img ORDSYS.ORDImage;
ctx RAW(4000) := NULL;
BEGIN
INSERT INTO IMGADDENDSTORE
VALUES(item,
ORDSYS.ORDImage(ORDSYS.ORDSource(empty_blob(), NULL, NULL, NULL, SYSDATE, 1), NULL, NULL, NULL, NULL, NULL, NULL, NULL));COMMIT;
Kenneth Lewin <lewin_kenneth_at_bah.com> wrote in message
news:3858FFFB.64606D8_at_bah.com...
> I am attempting to store a 1-2Meg file within a blob field in my
> database.
> How can the file be inserted into and extracted from the database via
> SQL*Plus?????
> (Oracle 8.1.5 database)
>
> thanks,
> -kl
Received on Thu Dec 16 1999 - 16:15:37 CST
![]() |
![]() |