CF Query appears to return incomplete data from text field

1.2k views Asked by At

I'm using CF8 and SQL2000. I'm storing a bunch of HTML in a Text field in my SQL table. When I do a simple CFQUERY against that data, and CFDUMP it, it's truncated to 64000 characters.

I've confirmed that my data is complete in the SQL table, by selecting the tail end of the data using SELECT Substring, and confirmed the length using SELECT Datalength(). It's really 65102 characters long.

Is this a limitation of CFQUERY, and if so, what's a good way around this?

2

There are 2 answers

0
Peter Boughton On BEST ANSWER

This is a CF Administrator datasource setting.

Edit the datasource, view the Advanced section, and increase from 64,000 to an appropriate value.

0
AudioBubble On

I agree with Peter, this sounds like you do not have CLOB enabled. By default, ColdFusion creates DSNs with this setting disabled which limits text retrieval to 64K. To expand on Peters directions, do the following:

  • Login to ColdFusion Administrator
  • Under Data & Services, select Data Sources
  • Click on your Data Source Name in question
  • Click the Show Advanced Settings button
  • 11 fields below the button, find CLOB and click the checkbox to "Enable long text retrieval (CLOB)"
  • Go back up and click the Submit button to save.