Skip to main content
July 24, 2007
Question

CLOB datatype

  • July 24, 2007
  • 1 reply
  • 231 views
Hi,
I have a couple of columns in Oracle of datatype CLOB that I am using to collect form values. The text in these columns is basically resumes of people that I am collecting. The data is inserted into the Oracle database with the format in which it is submitted. I am trying to retrieve the contents using a cfquery and then using a cfoutput to display the contents. When i display the contents, the format is no longer there and spaces and special characters are all removed before it is being output. The output is simply all the sentences with the spaces removed. i would like to preserve the format of the contents just like they are entered into the database. Does anybody have a solution this is problem. Any help will be greatly appreciated.

thank you.
This topic has been closed for replies.

1 reply

Inspiring
July 26, 2007
Assuming your query object and CLOB field are variables.myData.Resume and that your CLOB data does not contain HTML markup.

I suspect that you are output your CLOB data as <cfoutput>#variables.myData.Resume#</cfoutput>. If this is the case the brower is ignoring extra whitespace in the text. You can use a user defined function like the one below to format the data for display in HTML.

Note that you could combine all of these steps onto a single line, I have broken each down for readability.