Trim extranous characters before displaying

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default Trim extranous characters before displaying

    I'm using CF MX with MS SQL Server and I can't seem to get the trim function to
    work. As an example, I have a field that has a maximum of 100 characters. When
    it displays in the browser, the unused characters appear as spaces after the
    actual information. I'm using the following commands in my CFC file:

    <cfquery datasource="#ds#">
    UPDATE RRNEWS
    SET TITLE='#Trim(ARGUMENTS.TITLE)#',
    BODY='#Trim(ARGUMENTS.BODY)#',
    PHOTO='#Trim(ARGUMENTS.PHOTO)#'
    WHERE ARTICLEID=#ARGUMENTS.ARTICLEID#
    </cfquery>

    In the display page, the code is:

    <p><b>#news.title#</b><br>
    <img src="images/#news.photo#" border="0" align="right" hspace="2"
    vspace="5">#news.body#</p>
    </cfoutput>

    Does anyone have any ideas as to why this isn't working or what I might try to
    correct the problem?

    Thanks,
    Justin:beer;:confused;

    woolwerks Guest

  2. Similar Questions and Discussions

    1. Pages displaying to trim marks
      I have just updated acrobat from version 7 to 9... I have found 9 is doing something very weird where when I open up a file that I know has crop...
    2. Displaying UTF-8 characters
      Hi, I have a question about displaying/input UTF-8 characters. Say, I have a Text component & I need it to display some UTF-8 characters: (e.g....
    3. Problem displaying Japanese characters
      Hi, I want my application to have "Lucida Grande" font. Since I am not sure that every platform has it locally installed, I embedded it. I...
    4. Displaying special characters in datagrid
      Hi, Can anyone help me out, how to display special characters like '!', extra spaces between words, etc., in Datagrid. The above said characters...
    5. how to read japanese characters (multilingual characters) from a text file and save them in Access database ???
      HI All i m trying to read a text file, having some japanese characters and saved as UTF-8 encoding. I m using ASP,FSO ... my code is below,...
  3. #2

    Default Re: Trim extranous characters before displaying

    woolwerks wrote:
    > it displays in the browser, the unused characters appear as spaces after the
    > actual information. I'm using the following commands in my CFC file:
    how are these columns defined?
    PaulH *TMM* Guest

  4. #3

    Default Re: Trim extranous characters before displaying

    The columns are defined as follows:

    articleid, int, 4, not null, identity, identity seed 1
    title, char, 100, allow nulls
    body, char, 1500, allow nulls
    photo, char, 40, allow nulls
    woolwerks Guest

  5. #4

    Default Re: Trim extranous characters before displaying

    woolwerks wrote:
    > The columns are defined as follows:
    >
    > articleid, int, 4, not null, identity, identity seed 1
    > title, char, 100, allow nulls
    > body, char, 1500, allow nulls
    > photo, char, 40, allow nulls
    if i remember right, char columns get padded. maybe varchar?
    PaulH *TMM* Guest

  6. #5

    Default Re: Trim extranous characters before displaying

    Paul-

    That was it! Thanks a million for the assist. It is much appreciated.

    Thanks,
    Justin
    woolwerks Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139