Skip to main content
vksrinu
Inspiring
October 14, 2011
Answered

Getting empy spaces in the resultset

  • October 14, 2011
  • 3 replies
  • 2345 views

Hi,

we are migrating CF from 5 to 9. out app is working fine in CF5. but when we are running the same code in CF9, for all the result sets we are getting the empty sapce for each field.

Ex:

CF5:  field1: order_id , value="OL123456"

CF9:  field1: order_id , value="OL123456    "

we are getting the empty sapce for each field in the result sets. i know we can use the trim but we have so many pages in the application and we cant do that. can any one help how to fix this issue. I am using Ingres database and connecting to it using the other datasource in CF Admin.

Srinivas

This topic has been closed for replies.
Correct answer vksrinu

I have used query of queries and the issue is resolved.

3 replies

vksrinu
vksrinuAuthorCorrect answer
Inspiring
November 23, 2011

I have used query of queries and the issue is resolved.

Inspiring
October 14, 2011

The trailing spaces are probably because your db field is fixed length instead of varchar.  If you can change the datatype your problem will be solved.

vksrinu
vksrinuAuthor
Inspiring
October 14, 2011

yes. may be it could be the reason but we cant change them. as the present app and db working fine over the years.

Owainnorth
Inspiring
October 14, 2011

I'm not sure what you want people to suggest. Either don't upgrade, or fix the issue using one of the suggested methods.

Owainnorth
Inspiring
October 14, 2011

Are the spaces actually part of the resultset, or is it a one-off space being outputted by a scalar function? If so, add the output="false" attribute to the relevant cffunction tags.

If you can't go around putting trims everywhere, you'll need to put them in at the function level.

vksrinu
vksrinuAuthor
Inspiring
October 14, 2011

i am getting them part of result set.

Owainnorth
Inspiring
October 14, 2011

You're sure? You've dumped out the resultset in a cfdump and possibly used the len() function?