Friday, 21 May 2010

I have a problem with intermedia code to execution.so check the code and answer me the error?

SQL%26gt; create or replace procedure image_import(dest_id number, filename varchar2) i


2 img ordsys.ordimage;


3 ctx raw(64) := null;


4 begin


5 delete from image_table where id = dest_id;


6 insert into image_table (id, image)


7 values (dest_id, ordsys.ordimage.init())


8 returning image into img;


9


10 img.importFrom(ctx, 'file', 'IMAGEDIR', filename);


11 update image_table set image=img where id=dest_id;


12 end;


13 /





Procedure created.





SQL%26gt; call image_import(1,'flowers.jpg');


call image_import(1,'flowers.jpg')


*


ERROR at line 1:


ORA-00984: column not allowed here


ORA-06512: at "SCOTT.IMAGE_IMPORT", line 6


ORA-06512: at line 1

I have a problem with intermedia code to execution.so check the code and answer me the error?
i don't know much about Oracle so i have to use my SQL Server knowledge to try and help here, since no one else has offered.


first thing, the error line number 6 probably does not reference the line you have numbered as 6. my guess is that line 10 of your line numbered code is where the problem is. that would be the actual 6th line of code as defined by the ; designating the end of line.


if that is the case, i can't offer any more help as i am unfamiliar with the importFrom function, but you might try using defined variables instead of constants in the call. the parser may be confusing them for column names?


No comments:

Post a Comment