• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CF7 CFUPDATE BUG

New Here ,
Aug 17, 2006 Aug 17, 2006

Copy link to clipboard

Copied

Ok, first off I know I'm going to hear people say use CFQuery to do the update. - this isn't a choice for this application, as this is legacy code.

Here's the problem, we have a form that has this data in it (sorry for the crappy layout, I'm cutting and pasting the FORM cfdump results):

struct
ALLOW_FEATURE 1
COMMENTS [empty string]
DEPT_ID 1006,1034,1016
FIELDNAMES PRODUCT_ID,PRODUCT_NAME,SKU,MANUFACTURER,PRODUCT_DESCRIPTION,COMMENTS,TICKET_TYPE,STATUS_FLAG,ALLOW_FEATURE,SHOW_DT,IS_GIFTCERT,TAX_FLAG,SHIP_CATEGORY,SALE_PRICE,RETAIL_PRICE,HANDLE_COST,DEPT_ID,DEPT_ID,DEPT_ID,IMAGE_NAME,UPDATE_BUTTON
HANDLE_COST 0.00
IMAGE_NAME [empty string]
IS_GIFTCERT N
MANUFACTURER [empty string]
PRODUCT_DESCRIPTION #NI317 Poly filled jacket for cold weather.
PRODUCT_ID 18930
PRODUCT_NAME Poly Fill Jacket
RETAIL_PRICE 0.00
SALE_PRICE 64.88
SHIP_CATEGORY T
SHOW_DT [empty string]
SKU 6F170
STATUS_FLAG Y
TAX_FLAG Y
TICKET_TYPE 0
UPDATE_BUTTON Update Product


Now, on the action page, we have a bunch of things going on using other aspects of that data that I won't bore you with, but when we go to update using CFUPDATE using the following chunk of code:

<cfupdate tablename="sto_product" datasource="#sto_dsn#" formfields="sku,product_name,product_description,comments,status_flag,allow_feature,tax_flag,manufacturer,sale_price,retail_price,weight,dimensions,handle_cost,shipping_flag,stock_qty,store_id,ticket_type,is_giftcert,tax_flag,ship_category">

We get this error (I've replaced the real path with "xxxxxxxxxxx"):

Error Occurred While Processing Request
The given fieldname "DEPT_ID" could not be found in the table "sto_product".

The error occurred in D:\Inetpub\xxxxxxxxxxx\edit_product.cfm: line 99
Called from D:\Inetpub\xxxxxxxxxxxt\edit_product.cfm: line 94
Called from D:\Inetpub\xxxxxxxxxxx\edit_product.cfm: line 54
Called from D:\Inetpub\xxxxxxxxxxx\edit_product.cfm: line 1


98 :
99 : <cfupdate tablename="sto_product" datasource="#sto_dsn#" formfields="sku,product_name,product_description,comments,status_flag,allow_feature,tax_flag,manufacturer,sale_price,retail_price,weight,dimensions,handle_cost,shipping_flag,stock_qty,store_id,ticket_type,is_giftcert,tax_flag,ship_category">


Now if you notice, DEPT_ID isn't ANYWHERE in the formfields declaration. For some reason CFUPDATE is trying to use that field even though I am giving it a list of fields to use. Also, I've noticed that if you have spaces after each field name (before or after the comma) CFUPDATE craps out as well. Since this works in CFMX6.1 with all the hotfixes in place, it seems Cf 7 has a bug with CFUPDATE.

Has anyone else run into this problem at all?
TOPICS
Advanced techniques

Views

256

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 15, 2006 Oct 15, 2006

Copy link to clipboard

Copied

LATEST
I'm having the same problem. CF 7.02 running on Windows 2003 Server.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation