Re: Storing Word Files on DB
From: Tom Zamani <tom_at_taten.com.au>
Date: Wed, 15 Sep 1999 11:26:52 +1000
Message-ID: <7rmsis$efb$1_at_perki.connect.com.au>
Date: Wed, 15 Sep 1999 11:26:52 +1000
Message-ID: <7rmsis$efb$1_at_perki.connect.com.au>
you need to use dbms_lobs pakage.
first you need to
login as system
grant execute on dbms_lobs to user
procedure insrt_lobs
is
-- ac clob default null; amount number; a_file bfile:=bfilename('directory','you document'); ---- begin -- update edition set TEMP_CLOB = empty_clob(); --use empty_clob() to default the lob -- commit; select TEMP_CLOB into ac from edition --select the clob pointer -- dbms_lob.fileopen(a_file,dbms_lob.file_readonly); amount:=dbms_lob.getlength(a_file); dbms_lob.loadfromfile(ac,a_file,amount); dbms_lob.fileclose(a_file); -- end; Good luck Michael Stelly wrote in message <7ra0r4$jrv$1_at_nnrp1.deja.com>...Received on Wed Sep 15 1999 - 03:26:52 CEST
>In article <7r9n29$d0j$1_at_nnrp1.deja.com>,
> shmurphy_at_my-deja.com wrote:
>> In article <37D82AF4.B7F8F85_at_vossnet.co.uk>,
>> Mark Gumbs <mgumbs_at_vossnet.co.uk> wrote:
>> > Hi,
>> >
>> > Our client requiers the functionality of storing word files on the
>> > database side.
>> > Which oracle packages, if any, allows us to do this. I think BLOBs
>> may
>> > play a part somewhere.
>> >
>> > Mark
>> >
>> >
>> Mark, I'm doing exactly this at my client's site. However, I'm using a
>> Visual Basic front end, Oracle 8.0 database, and Microsoft ODBC
>drivers.
>> I'm saving the document data as LONG_RAW (binary) and letting Word
>> convert it back when it's reloaded later. If you're using Oracle's
>> drivers, you'd probably use CLOB. I'd be happy to e-mail you some
>code.
>> E-mail me at shmurphy_at_wfubmc.edu tomorrow (9/10/99) if interested
>> [although not sure of your time zone difference].
>> -Murf
>>
>> Sent via Deja.com http://www.deja.com/
>> Share what you know. Learn what you don't.
>>
>
>I think that Mark's first assumption is correct. Word files are stored
>in binary format, so I would use a BLOB vs. CLOB. My understanding is
>that CLOBS are used for very large (4gb) character files. If you can
>reference Feuerstein's PL/SQL Programming book, he gives a detailed
>explanation about the use of large objects vs. LONG's or RAW's.
>
>Good luck,
>--
>Michael Stelly
>m_stelly_at_my-deja.com
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.