Error inserting images [message #72023] |
Mon, 24 February 2003 23:00 |
kwan
Messages: 3 Registered: November 2002
|
Junior Member |
|
|
Hi there,
I have created the table -
>CREATE TABLE items (
> item_num NUMBER(5) primary key,
> item_nam VARCHAR2(64) not null,
> item_pho ORDSYS.ORDImage)
>tablespace user_1;
and insert a row with initiator -
>INSERT INTO items VALUES (
> 1, 'Item one',
> ORDSYS.ORDImage.init());
then I tried to insert the image with the following sqlplus statement -
>DECLARE
>image ordsys.ordimage;
>ctx RAW(4000):= NULL;
>BEGIN
>SELECT item_pho INTO image FROM items
>where item_num = 1 for UPDATE;
>
>Image.setSource('file','IMAGE','1.gif');
>Image.import(ctx);
>
>update items set item_pho = image where item_num = 1;
>commit;
>end;
>/
I have already created the directory 'IMAGE' which refers to the location where the image is stored and granted read access to the user_1.
However, I have this error message when I run the sqlplus script
SQL> @ 1.sql
DECLARE
*
ERROR at line 1:
ORA-04031: unable to allocate 4032 bytes of shared memory ("shared
pool","unknown object","joxs heap init","ioc_allocate_pal")
ORA-06512: at "ORDSYS.ORDIMG_PKG", line 608
ORA-06512: at "ORDSYS.ORDIMAGE", line 65
ORA-06512: at "ORDSYS.ORDIMG_PKG", line 695
ORA-06512: at "ORDSYS.ORDIMAGE", line 213
ORA-06512: at line 9
Does this error relate to storage space?? How do I fix it??
Thanks in advance for help
|
|
|
|