Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: PDF's file in oracle database
Thanks Ian,
One more question. Your script, is it working on oracle 8i?
Should the directory created on server not on client?
>
> I must admit that I'm fairly sure I wrote most of these scripts
> against 9i or 10g (don't think I've used 8i since 2001 :) )
>
> Just to double check though - based on your directory name the
> PL/SQL should be;
>
> create or replace procedure load_blob (filnam in varchar2) as
> blob_loc blob;
> bfile_loc bfile;
> begin
> insert into test_blob_data2(filename,
> filedata)
> values ('c:\test\'||filnam,
> empty_blob()) returning filedata into blob_loc;
> bfile_loc := bfilename('MY_FILES',filnam);
> dbms_lob.fileopen(bfile_loc);
> dbms_lob.loadfromfile (blob_loc,bfile_loc,dbms_lob.getlength(bfile_loc));
> dbms_lob.fileclose(bfile_loc);
> end;
> /
> show err
>
> One other thing I seem to recall is that there may have been a
> problem with directories that required the trailing \ i.e.
>
> CREATE OR REPLACE DIRECTORY MY_FILES as 'c:\test\'
>
> although I might just be imaging this.
>
> Cheers,
>
> Ian
>
>
>
>
> This email is only intended for the person to whom it is addressed
> and may contain confidential information. If you have received this
> email in error, please notify the sender and delete this email
> which must not be copied, distributed of disclosed to any other
> person.
> Unless stated otherwise, the contents of this email are personal to
> the writer and do not represent the official view of Ordnance
> Survey. Nor can any contract be formed on Ordnance Survey's behalf
> via email. We reserve the right to monitor emails and attachments
> without prior notice.
>
> Thank you for your cooperation.
>
> Ordnance Survey
> Romsey Road
> Southampton SO16 4GU
> Tel: 023 8079 2000
> http://www.ordnancesurvey.co.uk
-- _______________________________________________ Search for businesses by name, location, or phone number. -Lycos Yellow Pages http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10 -- http://www.freelists.org/webpage/oracle-lReceived on Tue Sep 06 2005 - 03:09:43 CDT
![]() |
![]() |