Home » SQL & PL/SQL » SQL & PL/SQL » How to store PDF file in CLOB datatype (Oracle 9i on Win XP)
How to store PDF file in CLOB datatype [message #307800] Thu, 20 March 2008 00:36 Go to next message
hari_bk
Messages: 110
Registered: March 2006
Senior Member
Hi I want to store a PDF file in CLOB datatype.Can anyone suggest me how to do this task.

Thanks
Hari
Re: How to store PDF file in CLOB datatype [message #307802 is a reply to message #307800] Thu, 20 March 2008 00:41 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Isn't pdf a binary format?
If so, you should use a blob, or somehow convert it to characters.
Re: How to store PDF file in CLOB datatype [message #307805 is a reply to message #307802] Thu, 20 March 2008 00:56 Go to previous messageGo to next message
hari_bk
Messages: 110
Registered: March 2006
Senior Member
Hi Frank. My PDF is having only text data and NOT HAVING images. still Its in Binary format?

Re: How to store PDF file in CLOB datatype [message #307806 is a reply to message #307800] Thu, 20 March 2008 00:57 Go to previous messageGo to next message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Use the search field here and on AskTom there are many topics on this.

Regards
Michel
Re: How to store PDF file in CLOB datatype [message #307810 is a reply to message #307800] Thu, 20 March 2008 01:06 Go to previous messageGo to next message
hari_bk
Messages: 110
Registered: March 2006
Senior Member
apologize for typing part of message in CAPS. its unintentional.

Thanks
Hari
Re: How to store PDF file in CLOB datatype [message #307817 is a reply to message #307805] Thu, 20 March 2008 01:25 Go to previous messageGo to next message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
My PDF is having only text data and NOT HAVING images. still Its in Binary format?

Yes, like Word, Excel or other programs of this kind ouput. Just try to open it with notepad or vi and you will see.

Regards
Michel
Re: How to store PDF file in CLOB datatype [message #307822 is a reply to message #307800] Thu, 20 March 2008 01:43 Go to previous messageGo to next message
hari_bk
Messages: 110
Registered: March 2006
Senior Member
Yes. I can see data in binary format when i try to open PDF using word.

Can I insert Text data of word file in CLOB?

Thanks
Re: How to store PDF file in CLOB datatype [message #307827 is a reply to message #307822] Thu, 20 March 2008 01:54 Go to previous messageGo to next message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Word file is also binary.
You can save the file in text form but you will lose all what is not the text itself (font, size, color, titles...).

Regards
Michel
Re: How to store PDF file in CLOB datatype [message #307836 is a reply to message #307800] Thu, 20 March 2008 02:24 Go to previous messageGo to next message
hari_bk
Messages: 110
Registered: March 2006
Senior Member
Ok..But Data in which format ideally stored in CLOB?

Can you forward me a link for an example for basic read, write operations for CLOB and BLOB columns. I couldnt find correct example. most of the examples i find are using java classes or .Net.

My requirement is using PL/SQL read/write in CLOB,BLOB columns.

Thanks

Re: How to store PDF file in CLOB datatype [message #307853 is a reply to message #307836] Thu, 20 March 2008 03:13 Go to previous message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
pure text -> clob
formatted text / binary -> blob

Quote:
Use the search field here and on AskTom there are many topics on this


Regards
Michel
Previous Topic: Materialized view creation with subquery
Next Topic: How to ignore ORA-01927 and proceed with loop process
Goto Forum:
  


Current Time: Thu Dec 08 12:12:09 CST 2016

Total time taken to generate the page: 0.24748 seconds