CF5 Sever to CF8 Server problem with one page!

Hi

Have changed from CF5 server to CF8 server. Everything works so far except for one page.

This is the error below that I get:


struct
BTNEDIT_OK OK
BUSINESS_ID 188
COMPANY_NAME x
COUNTRY_ID 13
DEBTOR_TYPE 1
DOB_DAY Day
DOB_MONTH Month
DOB_YEAR Year
EMAIL 1
ENTITY_ID 1
FIELDLIST business_id,first_name,middle_name,last_name,date_of_birth,debtor_typ e,company_name,entity_id,trading_name,phone_prefix,phone,mobile,email, postal_address,postal_suburb,postal_city,postcode,last_modified,times_ used,recoverable_costs,data_checked,country_id,state
FIELDNAMES FIELDLIST,FIRST_NAME,MIDDLE_NAME,LAST_NAME,DOB_DAY,DOB_MONTH,DOB_YEAR ,DEBTOR_TYPE,COMPANY_NAME,ENTITY_ID,TRADING_NAME,PHONE,MOBILE,EMAIL,PO STAL_ADDRESS,POSTAL_SUBURB,POSTAL_CITY,POSTCODE,COUNTRY_ID,TIMES_USED, BUSINESS_ID,BTNEDIT_OK
FIRST_NAME [empty string]
LAST_NAME [empty string]
MIDDLE_NAME [empty string]
MOBILE 1
PHONE 1
POSTAL_ADDRESS 1
POSTAL_CITY 1
POSTAL_SUBURB 1
POSTCODE 1
TIMES_USED 0
TRADING_NAME [empty string]

The FIELDLIST column cannot be found in the DEBTORS table.

he error “The FIELDLIST column cannot be found in the DEBTORS table”, is odd as there is no column in my debtors table named that. It appears that CF8 is searching through all my field names and looking for them in the debtors database. It is getting these field names from my Form. And offourse there is no column named ‘Fieldlist’. This all works fine in CF5, so must be a problem with CF8 seeing the tags differently or something???

Below is a copy of the action page in question. I think this may need to be updated to work with CF8. Any help would be appreciated. I alos have the code for the form if anyone needs it as well.

<!------>

<CFLOCATION url="index.cfm?fuseaction=DEBTORS_RecordView">
<CFELSEIF ParameterExists(Form.btnEdit_OK)>
<CFIF ParameterExists(Form.debtor_id)>
 
 
<CFUPDATE dataSource="#request.dsn#" tableName="DEBTORS" formFields="#form.fieldList#">
<cfif IsDefined("form.recoverable_costs")>
<cfquery username="edebt" password="D7Oe+lus" name="GetRecord" datasource="#request.dsn#" maxrows=1 dbtype="ODBC">
update DEBTORS
Set recoverable_costs = 1
where DEBTORS.debtor_id = #Form.debtor_id#
</cfquery>
<CFLOCATION url="index.cfm?fuseaction=DEBTORS_RecordView">
<cfelse>
<cfquery username="edebt" password="D7Oe+lus" name="GetRecord" datasource="#request.dsn#" maxrows=1 dbtype="ODBC">
update DEBTORS
Set recoverable_costs = 0
where DEBTORS.debtor_id = #Form.debtor_id#
</cfquery>
<CFLOCATION url="index.cfm?fuseaction=DEBTORS_RecordView">
</cfif>
 
 
<CFELSE>
 
 
<cfif IsNumeric(form.dob_Year) AND IsNumeric(form.dob_Month) AND IsNumeric(form.dob_Day)>
        <cfset date_of_birth = CreateDate(form.dob_Year,form.dob_Month,form.dob_Day)>
        <cfset date_of_birth_ok = "some_value">
 
     </cfif>
<cftry>
<!---<cfscript>
if (NOT IsDefined("form.data_checked")){
form.fieldlist = ListAppend(form.fieldlist, "data_checked",",");
form.data_checked = 0;
} else writeoutput("defined");
</cfscript>--->
 
        <cfscript>
if (NOT IsDefined("form.data_checked")){
form.fieldlist = ListAppend(form.fieldnames, "data_checked",",");
form.data_checked = 0;
} else writeoutput("defined");
</cfscript>
 
<!---<CFINSERT dataSource="#request.dsn#" tableName="DEBTORS" formFields="#Form.FieldList#">--->
        <CFINSERT dataSource="#request.dsn#" tableName="DEBTORS" formFields="#Form.Fieldnames#">
 
<cfcatch><cfoutput>#cfcatch.message##cfcatch.detail##form.fieldnames#< /cfoutput><!---
                                           <cfloop from="1" to=#listlen(form.fieldnames)# index="lk">
                                                 <cfoutput>= #lk#<br></cfoutput>
</cfloop>--->
<cfabort>
</cfcatch>
</cftry>
<cfquery username="edebt" password="D7Oe+lus" name="get_new_id" datasource="#request.dsn#" maxrows=1 dbtype="ODBC">
select Max(debtor_id) As The_new
from DEBTORS
</cfquery>
<cfif IsDefined("date_of_birth_ok")>
<cfquery username="edebt" password="D7Oe+lus" name="get_new_id" datasource="#request.dsn#" dbtype="ODBC">
update DEBTORS
set date_created = #now()#,
    date_of_birth= #createODBCdate(date_of_birth)#
where debtor_id = #get_new_id.The_new#
</cfquery>
</cfif>
<CFLOCATION url="index.cfm?fuseaction=DEBTORS_RecordView" addtoken="No">
</CFIF>
 
<CFELSEIF ParameterExists(Form.btnEdit_Cancel)>
<CFLOCATION url="index.cfm?fuseaction=DEBTORS_RecordView" addtoken="No">
</CFIF>

The fieldlist column gets submitted with forms, it’s a comma delimited list of all the fields in the form submission.

Has nothing to do with the database.

I believe your error has something to do with the CFUPDATE tags…*not sure though because I never use those.

Thanks for the reply, I will try and work out from there. If anyone else has any could add to that… that would be great. :slight_smile:

Do you guys mean COLUMNLIST field?

In CF8, by default, the QUERY object will return with a key called COLUMNLIST which is a CF-generated comma-delimited list of all the column names returned. CF creates 2 other structure keys, ‘recordcount’ and ‘currentrow’.

Adobe ColdFusion 8

and after further investigation I think THAT is the problem. In all their infinite wisdom, they changed FORM.fieldlist into FORM.columnlist.

This little piece of wisdom was gleemed from house of fusion.
Checking all form fields