Reputation: 830
I have a SQL database with a ntext
field which holds page content.
I am using ColdFusion to query the information and deliver it to a form.
The form utilises ckeditor for this particular field, the field at present contains around 4000 characters. When looking in the ckeditor window it appears some of the text is missing.
However, when I look at the database data the text is not truncated at all; it is completely intact.
I thought this might be a character limitation with ckeditor, so I turned it off and viewed the data through a textarea box but the text is still missing.
The query is a simple select query held within a component, nothing special:
<cfquery name="getDrilledContent" datasource="#application.dsn#">
SELECT co.uid_content, co.txt_contentgroup, co.txt_contentRefID, co.uid_contentuser, co.txt_contentvalue, co.dte_contentdate, co.txt_contentpagename,
co.txt_metatitle, co.txt_metadescrip, co.txt_metakeywords, co.txt_metaurl, co.bit_primary, co.txt_h1, co.txt_contenturl, co.txt_contentlink,
us.txt_du_firstname, us.txt_du_surname, txt_du_email, dte_edited, uid_changedby
FROM tbl_content co
INNER JOIN tbl_datausers us ON co.uid_contentuser=us.uid_datauser
WHERE uid_contentwebid = <cfqueryparam cfsqltype="cf_sql_integer" value="#session.webid#">
<cfif Isdefined('arguments.uid_content') AND arguments.uid_content NEQ "">
AND co.uid_content=<cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.uid_content#"></cfif>
</cfquery>
Why isn't this query pulling all the data down?
Upvotes: 4
Views: 1892
Reputation: 830
Not to worry I've worked it out! It was a ColdFusion Administrator setting.
Under Data & Services -> Datasources, edit the datasource, and click the Show Advanced Settings button. This reveals additional options, one of which is CLOB - Enable long text retrieval.
I checked the check box, and the problem was resolved.
Upvotes: 7