Tuesday, May 25, 2010

Enable long text retrieval in coldfusion

If you are ever going to use long text fields in mysql or a SQL server you will get a strange result when outputting this data. By default ColdFusion retrieves the number of characters specified in the Long Text Buffer setting (under the advanced settings of a datasource). When coldfusion stores the information of the database into an structure or variable it limits the number of characters (if you are using utf-8 by default about 4.000 characters will be stored). To prevend this behavior and to be able to display the complete content of the database cell you need to check the Enable long text retrieval (CLOB) in the advance settings of a data source.

No comments: