The Value of Description field in Coldfusion does not go away

Description FieldTable in MS ACCESSHi,
 I have CFM page where the description field (TEXTAREA) displays old value even after I replaced it with new text. As seen on the screenshot below, the new value that I assigned to Description field shows the new text and immediately followed by old text.

Old Value: "VERY CLEAN! Conestoga Kit, Air Ride Slider, 48x96 Steel Flatbed, 22.5 11 r Tires & Wheels, 50% Brakes & Tires"
New Value "Swing doors, spring ride slider, 22.5 low pro tires, 3 side doors (curb side) spring ride slider".

Here is my CF code:

 <td colspan="2"><b>Description:
                           </td> </tr> <tr>  <td colspan="2"> <TEXTAREA NAME=Description ROWS=5 COLS=33 WRAP="VIRTUAL"><cfoutput>#GetFeaturedItems.Description#</cfoutput></TEXTAREA></td>   </tr>

When I open the table in MS ACCESS, I see the new text in Description field and I do not see old text. I don't know where this old text comes from.
One thing that is very strange is that "VERY CLEAN! Conestoga Kit, Air Ride Slider, 48x96 Steel Flatbed, 22.5 11 r Tires & Wheels, 50% Brakes & Tires" is in two other records on the table along with different Item No and this is what is repeating.
LVL 1
sgleeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

_agx_Commented:
If you dump the raw query used to populate the text field, does it contain both the old + new text?
ie <cfdump var="#GetFeaturedItems#">
0
sgleeAuthor Commented:
Here is the dump and item listing on the webpage along with MS access records.
CFDumpitem listingMS Access Inventory Table
0
_agx_Commented:
Are you using a CFFORM or regular form?

Can you dump the individual values right before the textarea (but not inside it).  Use HTMLEditFormat to be sure it displays any hidden characters:

<td colspan="2">
<!--- debugging code --->
 Value: <cfoutput>#HTMLEditFormat(GetFeaturedItems.Description)#</cfoutput>

<TEXTAREA NAME=Description ROWS=5 COLS=33 WRAP="VIRTUAL">cfoutput>#GetFeaturedItems.Description#</cfoutput></TEXTAREA></td>
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

sgleeAuthor Commented:
Here it is:CFDump
0
_agx_Commented:
Hm... that looks like the text IS part of the records.

Create a totally separate debug page with only the cfquery. Output the data for each row (no tables or extra html). That should confirm whether the text is actually part of the record or it just seems that way in the html:

<cfoutput query="GetFeaturedItems">
<hr>#TheIDColumnForTheTable# ||
<pre>#HTMLEditFormat(GetFeaturedItems.Description)#</pre>
</cfoutput>
0
sgleeAuthor Commented:
I am getting an error when I run the code above:
"Variable THEIDCOLUMNFORTHETABLE is undefined. "
0
_agx_Commented:
That's just a placeholder for the query column containing the record id.  :) Now I see it's literally named "ID", so just replace it with #ID#
0
sgleeAuthor Commented:
I ran the following code on a separate CFM page:
            <CFQUERY NAME="GetCategory" datasource="CCT">
                  SELECT      *
                     FROM         Category
            ORDER BY Category
            </CFQUERY>
            <CFQUERY NAME="GetFeaturedItems" datasource="CCT">
                  SELECT      Inventory.* ,  Category.Category
                     FROM         Inventory, Category
                WHERE    Inventory.CategoryID = Category.ID
            </CFQUERY>
<cfoutput query="GetFeaturedItems">
 <hr>#ID#
 <pre>#HTMLEditFormat(GetFeaturedItems.Description)#</pre>
 </cfoutput>


24 Swing doors, spring ride slider, 22.5 low pro tires, 3 side doors (curb side) spring ride slider
25 VERY CLEAN! Conestoga Kit, Air ride slider, 48x96 steel flatbed, 22.5 11r tires & wheels, 50% brakes & tires
26 Swing doors, spring ride slider, 22.5 low pro tires, 3 side doors (curb side) spring ride slider.
27 Please call for the best deal!
28 VERY CLEAN! Conestoga Kit, Air Ride Slider, 48x96 Steel Flatbed, 22.5 11 r Tires & Wheels, 50% Brakes & Tires
0
_agx_Commented:
Are those the same records in the screen shots?  The id's are different, so I'm not sure where record begins and ends without the "||" and "<hr>".
0
sgleeAuthor Commented:
Sorry I dumped all records from the table. Here are the records IDs and corresponding Item No shown on EE ID: 40924890
      Record ID  ItemNo
       26               1012
      27               1015
      28               1016

 26     Swing doors, spring ride slider, 22.5 low pro tires, 3 side doors (curb side) spring ride slider.
 27     Please call for the best deal!
 28     VERY CLEAN! Conestoga Kit, Air Ride Slider, 48x96 Steel Flatbed, 22.5 11 r Tires & Wheels, 50% Brakes & Tires
0
_agx_Commented:
Ok, then that confirms the text really isn't part of the db record, and it's likely something to do with your output code.   I'm trying to avoid you having to post the code for the entire page, so first ... are you using a "grouped" cfoutput query="...." anywhere in that page?   Edit: Or maybe nested <cfoutput> tags?
0
_agx_Commented:
Hm... curious, looking at the screen shots the first table seems to contains all 3 descriptions (26,27,28), the 2nd one contains (27,28) and the last one contains only (28).
0
sgleeAuthor Commented:
Here is the code:

Here is CFM page in a nutshell:

<CFFORM name="form1" Method=POST ACTION="ListInventory.cfm">
<tr>
<td>
<table width=880 border=0 cellpadding=0 cellspacing=0 valign="middle" align="center" style="border:1px outset black;">
          <td bgcolor="ffffff" align="left">&nbsp;&nbsp;&nbsp;<font FACE="verdana,arial,helvetica" size=2>
                  <SELECT NAME="CategoryID">
                    <OPTION VALUE="0"></OPTION>
                  <CFOUTPUT query="GetCategory">
                  <OPTION VALUE="#ID#">#Category#</OPTION>
                  </CFOUTPUT>
                  </SELECT>
            </TD>
        <TD bgcolor="ffffff" colspan=5 align=center>
                  <INPUT TYPE=SUBMIT Name"Submit_Btn" VALUE="List Inventory">
</table>

</CFFORM>
</div>

            <CFQUERY NAME="GetFeaturedItems" datasource="CCT">
                  SELECT      Inventory.* ,  Category.Category
                     FROM         Inventory, Category
                WHERE   Inventory.Featured = 'Y'
                AND Inventory.CategoryID = Category.ID
            </CFQUERY>
<div>

<TABLE width=880 border="0" cellpadding="1" cellspacing="1" align="center" >
       <cfoutput query="GetFeaturedItems">

         <td align="center" >
         <table border="0" Style="border:2px outset black;">
         <tr>
                 <TD align="center" bgcolor="DDDDDD">
                      <table width="100%" border="0" align="center">
                           <tr>
                           <td bgcolor="005BA4" colspan="2" align="center" height="60px" width="220px">
                         <font color="ffffff"> <B>#Title#</B></font>               
                           </td>
                           </tr>
                           <tr>
                           <td colspan="2" align="center" bgcolor="FFFFFF"><img border="0" width = "220" height="120" src="http://www.domain.com/ImageUpload/#pic1#"><BR>
                           </td>
                           </tr>
                           <tr>
                           <td>
                            <b>Condition:&nbsp;&nbsp;
                              </td>
                           <td><font color="990000">#Condition#</font></b>

                           <td><b>Item No:</b>
                           </td>
                           <td>#ItemNo#
                           </td>
                           </tr>
                             <tr>
                           <td><b>Price:</b>
                           </td>
                           <td>#numberformat(Price, "$(,.00)")#
                           </td>
                           </tr>
                           <tr>
                           <td colspan="2"><b>Description:</b><BR>
<cfoutput>#HTMLEditFormat(GetFeaturedItems.Description)#</cfoutput>
                           </td>
                           </tr>
                           <tr>
                           <td colspan="2"> <TEXTAREA NAME=Description ROWS=5 COLS=33 ><cfoutput>#Description#</cfoutput></TEXTAREA>
                           </td>
                           </tr>
                           <tr>
                           <td colspan="2" align="center"><img src="/images/img_call.jpg" border="0">
                           </td>
                           </tr>            
                  </table>
             </TD>
          </tr>
         </table>
         </td>
<cfif GetFeaturedItems.currentRow mod 3 eq 0>
  <cfif GetFeaturedItems.currentRow gt 1>
     </tr>
  </cfif>
     <tr>
  </cfif>
         </cfoutput>
      <TR><TD >&nbsp;&nbsp;&nbsp;</TD></TR>
      <tr>
            <!--<TD>&nbsp;&nbsp;&nbsp;</TD>-->
          <td align="center"></td>
            
      </tr>
      <tr>
            <TD colspan=3>&nbsp;&nbsp;&nbsp;</TD>
      </tr>
      <!--<tr>
      <td colspan="3"><br />
      </td>
      </tr>-->
</table>
0
_agx_Commented:
Ohh.... wait a minute.  I think it's the extra <cfoutput> tags.  

Since you're already inside a cfoutput loop, when you include the extra tags around the query column, it causes the values from multiple rows to be displayed inside the textarea, similar to using a "grouped" cfoutput.  

<cfoutput query="GetFeaturedItems">
   ...
    <TEXTAREA NAME=Description ROWS=5 COLS=33 ><cfoutput>#Description#</cfoutput></TEXTAREA>
   ...
</cfoutput>

Get rid of the inner cfoutput tags and it should work fine.

      <cfoutput query="GetFeaturedItems">
            .....
            <!--- don't use cfoutput tags around the column variable --->
            <TEXTAREA NAME=Description ROWS=5 COLS=33 >#Description#</TEXTAREA>
            ...
      </cfoutput>
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sgleeAuthor Commented:
@agx

That was it. I had redundant <cfoutput>... </cfoutput> around  #Description#
Thank you for pointing that out. You are so good!!!
0
_agx_Commented:
Yeah, it's one of those minor things that is very easy to overlook but creates some really unexpected results.  Glad I could help :)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ColdFusion Language

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.