Skip to main content
Inspiring
February 18, 2010
Question

RTF and Oracle ... oh my

  • February 18, 2010
  • 2 replies
  • 2333 views

Anybody know how to store RTF documents in Oracle and then retrieve them so they are actually readable? Using ColdFusion 8 if possible.

I can get the data into the db but it is in binary format. Then when it comes out it is still in binary and can't be read by any editors. urg.

This topic has been closed for replies.

2 replies

Inspiring
February 21, 2010

You shouldn't need to do anything special: the "T" in "RTF" stands for text.  It's just a text format.

But seeing your code and your DB table structure would certainly take a lot of the guess work as to where you're going wrong ;-)

--

Adam

DinghusAuthor
Inspiring
February 22, 2010

Well, the code is simply a cffile reading the file in binary and then taking that data a putting it into a blob in Oracle. BUT all I get is "garbage" because there is a graphic in the file. The editing was originally done in Word then saved as RTF. So the "text" part (I already knew that) is immaterial.

But if I do a straight cffile read, not binary read, Oracle will not accept it even using cfsqlquerytype

The biggest problem with this whole system is that the files are on a file server now. Before the app and files were on the same server so Word could read, edit, and save the files. Now of course, it can't if it is opening it across the network, unless I open it to everyone, which is not an option.

The client wants it all in the database tho. Even their Oracle guru has no insight into this one.

Inspiring
February 22, 2010

OK, as per my previous post... RTF files are not binary data.  It's just text.  Even the embedded image has been serialised into plain text (open the file in notepad and have a look!).

So stop treating it as if it is binary data.  It's just character data.

--

Adam

Inspiring
February 19, 2010

Please post the code you are using to retrieve and display the RTF files.