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_type,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,POSTAL_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.
FIELDLIST,FIRST_NAME,MIDDLE_NAME,LAST_NAME,DOB_DAY,DOB_MONTH,DOB_YEAR,DEBTOR_TYPE,COMPANY_NAME,ENTITY_ID,TRADING_NAME,PHONE,MOBILE,EMAIL,POSTAL_ADDRESS,POSTAL_SUBURB,POSTAL_CITY,POSTCODE,COUNTRY_ID,TIMES_USED,BUSINESS_ID,BTNEDIT_OK
------------------------------------------------------------------------------------
The 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.
Below is a copy of the page in question. I think this may need to be updated to work with CF8. Any help would be appreciated.
------------------------------------------------------------------------------------
<script language="javascript">
function goDelete() {
if (confirm("Are you sure you want to delete this record?\nDeletion cannot be undone.")) {
document.frmEdit.action="index.cfm?fuseaction=DEBTORS_RecordAction&delete=y";
document.frmEdit.submit();
}
}
function goDeleteFail() {
alert('There are invoice sets against this debtor, deletion is not allowed.');
}
</script>
<cfquery username="edebt" password="D7Oe+lus" name="GetCOUNTRY" dataSource="#request.dsn#">
SELECT *
FROM COUNTRY
</cfquery>
<CFSET FormFieldList = "business_id,first_name,middle_name,last_name,date_of_birth,debtor_type,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">
<CFIF ParameterExists(URL.debtor_id)>
<cfquery username="edebt" password="D7Oe+lus" name="GetRecord" dataSource="#request.dsn#" maxRows=1>
SELECT DEBTORS.business_id,
DEBTORS.first_name,
DEBTORS.middle_name,
DEBTORS.last_name,
DEBTORS.date_of_birth,
Debtors.debtor_type,
DEBTORS.company_name,
DEBTORS.entity_id,
DEBTORS.trading_name,
DEBTORS.phone_prefix,
DEBTORS.phone,
DEBTORS.mobile,
DEBTORS.email,
DEBTORS.recoverable_costs,
DEBTORS.postal_address,
DEBTORS.postal_suburb,
DEBTORS.postal_city,
DEBTORS.postcode,
DEBTORS.last_modified,
DEBTORS.customer_note ,
DEBTORS.times_used,
DEBTORS.data_checked,
DEBTORS.debtor_id AS ID_Field,
DEBTORS.state,
DEBTORS.country_id
FROM DEBTORS
<CFIF ParameterExists(URL.debtor_id)>
WHERE DEBTORS.debtor_id = #URL.debtor_id#
</CFIF>
</CFQUERY>
<cfquery username="edebt" password="D7Oe+lus" name="x_business" dataSource="#request.dsn#" maxRows=1>
SELECT BUSINESSES.COUNTRY_ID
FROM BUSINESSES
WHERE BUSINESSES.business_id =#GetRecord.business_id#
</CFQUERY>
<cfquery username="edebt" password="D7Oe+lus" name="Orders" dataSource="#request.dsn#" maxRows=1>
SELECT *
FROM Business_orders
WHERE business_id = #GetRecord.business_id#
</CFQUERY>
<CFIF not ListFind( FormFieldList, "debtor_id" )>
<CFSET FormFieldList = ListAppend( FormFieldList, "debtor_id" )>
</CFIF>
<CFSET business_id_Value = #GetRecord.business_id#>
<CFSET first_name_Value = '#GetRecord.first_name#'>
<CFSET middle_name_Value = '#GetRecord.middle_name#'>
<CFSET last_name_Value = '#GetRecord.last_name#'>
<CFSET debtor_type_Value = '#GetRecord.debtor_type#'>
<CFSET company_name_Value = '#GetRecord.company_name#'>
<CFSET entity_id_Value = #GetRecord.entity_id#>
<CFSET trading_name_Value = '#GetRecord.trading_name#'>
<CFSET phone_prefix_Value = '#GetRecord.phone_prefix#'>
<CFSET phone_Value = '#GetRecord.phone#'>
<CFSET mobile_Value = '#GetRecord.mobile#'>
<CFSET email_Value = '#GetRecord.email#'>
<CFSET recoverable_costs_Value_chk = GetRecord.recoverable_costs>
<CFSET postal_address_Value = '#GetRecord.postal_address#'>
<CFSET postal_suburb_Value = '#GetRecord.postal_suburb#'>
<CFSET postal_city_Value = '#GetRecord.postal_city#'>
<CFSET postcode_Value = '#GetRecord.postcode#'>
<CFSET last_modified_Value = #GetRecord.last_modified#>
<CFSET times_used_Value = #GetRecord.times_used#>
<CFSET customer_note_value = '#GetRecord.customer_note#'>
<CFSET data_checked_value = '#GetRecord.data_checked#'>
<cfset heading = "Edit " & company_name_Value & "'s Details">
<cfset State_Value = GetRecord.State>
<cfset COUNTRY_ID_value = GetRecord.COUNTRY_ID>
<CFELSE>
<cfquery username="edebt" password="D7Oe+lus" name="x_business" dataSource="#request.dsn#" maxRows=1>
SELECT BUSINESSES.COUNTRY_ID
FROM BUSINESSES
WHERE BUSINESSES.business_id =#session.business_id#
</CFQUERY>
<CFSET business_id_Value = '#session.business_id#'>
<CFSET first_name_Value = ''>
<CFSET debtor_type_Value = '0'>
<CFSET middle_name_Value = ''>
<CFSET last_name_Value = ''>
<CFSET company_name_Value = ''>
<CFSET entity_id_Value = '1'>
<CFSET trading_name_Value = ''>
<CFSET phone_prefix_Value = '09'>
<CFSET phone_Value = ''>
<CFSET mobile_Value = ''>
<CFSET email_Value = ''>
<CFSET recoverable_costs_Value_chk = 0>
<CFSET postal_address_Value = ''>
<CFSET postal_suburb_Value = ''>
<CFSET postal_city_Value = ''>
<CFSET postcode_Value = ''>
<CFSET last_modified_Value = ''>
<CFSET times_used_Value = '0'>
<CFSET customer_note_value = ''>
<CFSET data_checked_value ='0'>
<cfset heading = "Add a New Debtor">
<cfset State_Value = ''>
<cfset COUNTRY_ID_value = x_business.COUNTRY_ID>
</CFIF>
<table border="0" cellspacing="0" cellpadding="5" width=560 align=center>
<cfform action="index.cfm?fuseaction=DEBTORS_RecordAction" method="POST" name="frmEdit">
<CFOUTPUT>
<INPUT type="hidden" name="FieldList" value="#FormFieldList#"><!------>
<CFIF ParameterExists(URL.debtor_id)>
<INPUT type="hidden" name="debtor_id" value="#URL.debtor_id#">
</CFIF>
<tr>
<td align="left" colspan=2><FONT face=Verdana,Arial,Helvetica,sans-serif color=##cc0000 size=3><B>#heading#</b></TD>
</tr>
<tr>
<td align="left" colspan=2><FONT face=Verdana,Arial,Helvetica,sans-serif color=##cc0000 size=2><B>Required fields are indicated with a "*"</b></TD>
</tr>
<cfif ParameterExists(url.debtor_id)>
<cfif NOT debtor_type_value>
<TR>
<TD class="contactadminsmall" valign="top" width="180" align="left"><nobr><span class="redtext">*</span>First Name:</TD>
<TD class="contactadminsmall" align="left" valign="top">#first_name_Value# </TD>
</TR>
<cfelse>
<TR>
<TD class="contactadminsmall" valign="top" width="180" align="left"><nobr><span class="redtext">*</span>First Name(not essential if company):</TD>
<TD class="contactadminsmall" align="left" valign="top"><INPUT type="text" size="35" name="first_name" value="#first_name_Value#" maxLength="400" class="button"></TD>
</TR>
</cfif>
<cfelse>
<TR>
<TD class="contactadminsmall" valign="top" width="180" align="left"><nobr><span class="redtext">*</span>First Name(not essential if company):</TD>
<TD class="contactadminsmall" align="left" valign="top"><INPUT type="text" size="35" name="first_name" value="#first_name_Value#" maxLength="400" class="button"></TD>
</TR>
</cfif>
<cfif ParameterExists(url.debtor_id)>
<cfif NOT debtor_type_value>
<TR>
<TD class="contactadminsmall" valign="top" width="180" align="left">Middle Name:</TD>
<TD class="contactadminsmall" align="left" valign="top">#middle_name_Value#</TD>
</TR>
<cfelse>
<TR>
<TD class="contactadminsmall" valign="top" width="180" align="left"><nobr>Middle Name:</TD>
<TD class="contactadminsmall" align="left" valign="top"><INPUT type="text" size="35" name="middle_name" value="#middle_name_Value#" maxLength="400" class="button"></TD>
</TR>
</cfif>
<cfelse>
<TR>
<TD class="contactadminsmall" valign="top" width="180" align="left"><nobr>Middle Name:</TD>
<TD class="contactadminsmall" align="left" valign="top"><INPUT type="text" size="35" name="middle_name" value="#middle_name_Value#" maxLength="400" class="button"></TD>
</TR>
</cfif>
<cfif ParameterExists(url.debtor_id)>
<cfif NOT debtor_type_value>
<TR>
<TD class="contactadminsmall" valign="top" width="180" align="left"><nobr><span class="redtext">*</span>Last Name:</TD>
<TD class="contactadminsmall" align="left" valign="top">#last_name_Value#</TD>
</TR>
<cfelse>
<TR>
<TD class="contactadminsmall" valign="top" width="180" align="left"><nobr><span class="redtext">*</span>Last Name(not essential if company):</TD>
<TD class="contactadminsmall" align="left" valign="top"><INPUT type="text" size="35" name="last_name" value="#last_name_Value#" maxLength="400" class="button"></TD>
</TR>
</cfif>
<TR>
<TD class="contactadminsmall" valign="top" width="180" align="left"><nobr><span class="redtext"></span>Date of Birth(only applies to individuals):</TD>
<TD class="contactadminsmall" align="left" valign="top">#dateFormat(getrecord.date_of_birth)#</TD>
</TR>
<cfelse>
<TR>
<TD class="contactadminsmall" valign="top" width="180" align="left"><nobr><span class="redtext">*</span>Last Name(not essential if company):</TD>
<TD class="contactadminsmall" align="left" valign="top"><INPUT type="text" size="35" name="last_name" value="#last_name_Value#" maxLength="400" class="button"></TD>
</TR>
<TR>
<TD class="contactadminsmall" valign="top" width="180" align="left"><nobr><span class="redtext"></span>Date of Birth(only applies to individuals):</TD>
<TD>
<CFSET months="January,February,March,April,May,June,July,August,September,October,November,December">
<CFSET monthsInts="1,2,3,4,5,6,7,8,9,10,11,12">
<cfset start_date = DateAdd("yyyy",-101,NOW())>
<SELECT NAME="dob_Day">
<OPTION VALUE="Day">Day</option>
<CFLOOP INDEX="d" from="1" to="31">
<OPTION VALUE="#d#" >#d#</option>
</cfloop>
</select>
<SELECT NAME="dob_Month">
<OPTION VALUE="Month">Month</option>
<CFLOOP INDEX="m" from="1" to="12">
<OPTION VALUE="#m#">#m#</option>
</cfloop>
</select>
<SELECT NAME="dob_Year">
<OPTION VALUE="Year">Year</option>
<CFLOOP INDEX="y" from="#DatePart("yyyy",start_date)#" to="#DatePart("yyyy",Now())#">
<OPTION VALUE="#y#">#y#</option>
</cfloop>
</select>
</TD>
</TR>
</cfif>
<TR>
<TD class="contactadminsmall" valign="top" width="180" align="left"><nobr><span class="redtext">*</span>Debtor Type:</TD>
<TD class="contactadminsmall" align="left" valign="top">Company:<input type="radio" name="debtor_type" value="1" <cfif debtor_type_value eq 1>Checked</cfif>><br>
Individual:<input type="radio" name="debtor_type" value="0" <cfif debtor_type_value eq 0>Checked</cfif>>
</TD>
</TR>
<cfif ParameterExists(url.debtor_id)>
<cfif NOT debtor_type_value>
<TR>
<TD class="contactadminsmall" valign="top" width="180" align="left"><nobr><span class="redtext">*</span>Company Name:(leave blank if the debtor is an individual)</TD>
<TD class="contactadminsmall" align="left" valign="top"><INPUT type="text" size="35" name="company_name" value="#company_name_Value#" maxLength="400" class="button"></TD>
</TR>
<cfelse>
<TR>
<TD class="contactadminsmall" valign="top" width="180" align="left"><nobr><span class="redtext">*</span>Company Name:</TD>
<TD class="contactadminsmall" align="left" valign="top">#company_name_Value#</TD>
</TR>
</cfif>
<cfelse>
<TR>
<TD class="contactadminsmall" valign="top" width="180" align="left"><nobr><span class="redtext">*</span>Company Name:(leave blank if the debtor is an individual)</TD>
<TD class="contactadminsmall" align="left" valign="top"><INPUT type="text" size="35" name="company_name" value="#company_name_Value#" maxLength="400" class="button"></TD>
</TR>
</cfif>
<TR>
<TD class="contactadminsmall" valign="top" width="180" align="left"><span class="redtext">*</span>Entity Type<br>(not required if individual selected, unless they are a sole trader or in a partnership):</TD>
<TD class="contactadminsmall" align="left" valign="top"><input type="radio" name="entity_id" value="1" <cfif entity_id_Value eq 1>checked</cfif>>Ltd<br>
<input type="radio" name="entity_id" value="2" <cfif entity_id_Value eq 2>checked</cfif>>Sole Trader<br>
<input type="radio" name="entity_id" value="3" <cfif entity_id_Value eq 3>checked</cfif>>Partnership<br>
<input type="radio" name="entity_id" value="4" <cfif entity_id_Value eq 4>checked</cfif>>Other<br></TD>
</TR>
<TR>
<TD class="contactadminsmall" valign="top" width="180" align="left"><nobr>Trading Name:</TD>
<TD class="contactadminsmall" align="left" valign="top"><INPUT type="text" size="35" name="trading_name" value="#trading_name_Value#" maxLength="400" class="button"></TD>
</TR>
<!---<cfquery username="edebt" password="D7Oe+lus" name="Phone_prefix_X" dataSource="#request.dsn#">
SELECT *
FROM Phone_prefix
WHERE country_id =#COUNTRY_ID_value#
</cfquery>--->
<TR>
<TD class="contactadminsmall" valign="top" width="180" align="left"><nobr><span class="redtext">*</span>Phone: (no spaces)</TD>
<TD class="contactadminsmall" align="left" valign="top">
<!---<select name="phone_prefix" class="button">
<cfloop query="Phone_prefix_X">
<option value="#Phone_prefix_X.prefix#" <cfif phone_prefix_value eq "#Phone_prefix_X.prefix#">SELECTED</cfif>>#Phone_prefix_X.prefix#</option>
</cfloop>--->
</select><INPUT type="text" size="25" name="phone" value="#phone_Value#" maxLength="400" class="button"></TD>
</TR>
<TR>
<TD class="contactadminsmall" valign="top" width="180" align="left"><nobr>Mobile:</TD>
<TD class="contactadminsmall" align="left" valign="top"><INPUT type="text" size="35" name="mobile" value="#mobile_Value#" maxLength="400" class="button"></TD>
</TR>
<TR>
<TD class="contactadminsmall" valign="top" width="180" align="left"><nobr>Email:</TD>
<TD class="contactadminsmall" align="left" valign="top"><INPUT type="text" size="35" name="email" value="#email_Value#" maxLength="400" class="button"></TD>
</TR>
<TR>
<!---<TD class="contactadminsmall" valign="top" width="180" align="left"><nobr>Recoverable Costs:</TD>
<TD class="contactadminsmall" align="left" valign="top"><input type="checkbox" name="recoverable_costs" value="1" <cfif recoverable_costs_Value_chk EQ 1 >checked</cfif>> (click to add)</TD>--->
</TR>
<TR>
<TD class="contactadminsmall" valign="top" width="180" align="left"><nobr><span class="redtext">*</span>Postal Address:</TD>
<TD class="contactadminsmall" align="left" valign="top"><INPUT type="text" size="35" name="postal_address" value="#postal_address_Value#" maxLength="400" class="button"></TD>
</TR>
<TR>
<TD class="contactadminsmall" valign="top" width="180" align="left"><nobr><span class="redtext">*</span>Postal Suburb:</TD>
<TD class="contactadminsmall" align="left" valign="top"><INPUT type="text" size="35" name="postal_suburb" value="#postal_suburb_Value#" maxLength="400" class="button"></TD>
</TR>
<TR>
<TD class="contactadminsmall" valign="top" width="180" align="left"><nobr><span class="redtext">*</span>Postal State:</TD>
<TD class="contactadminsmall" align="left" valign="top"><INPUT type="text" size="35" name="postal_city" value="#postal_city_Value#" maxLength="400" class="button"></TD>
</TR>
<TR>
<!--<TD class="contactadminsmall" valign="top" width="180" align="left"><nobr><span class="redtext">*</span>State:</TD>
<td class="contactadminsmall"><INPUT type="text" size="35" name="State" value="#state_Value#" class="button"><br></TD>-->
</TR>
<TR>
<TD class="contactadminsmall" valign="top" width="180" align="left"><nobr><span class="redtext">*</span>Postcode:</TD>
<TD class="contactadminsmall" align="left" valign="top"><INPUT type="text" size="35" name="postcode" value="#postcode_Value#" maxLength="400" class="button"></TD>
</TR>
<TR>
<TD class="contactadminsmall" valign="top" width="180" align="left"><nobr><span class="redtext">*</span >Country:</TD>
<td class="contactadminsmall">
<cfselect name="country_id" required="yes" message="You must select a country">
<cfloop query="GetCOUNTRY">
<cfscript>
value_y = false;
if(COUNTRY_ID_value eq GetCOUNTRY.id){
value_y = true;
}
if((COUNTRY_ID_value EQ 0 OR COUNTRY_ID_value EQ '') AND Trim(GetCOUNTRY.name) EQ "New Zealand"){
value_y = true;
}
</cfscript>
<option value="#GetCOUNTRY.id#" <cfif value_y>SELECTED</cfif>>#GetCOUNTRY.name#</option>
</cfloop>
</cfselect>
</TD>
</TR>
<input type="hidden" name="times_used" value="#times_used_Value#">
<cfif session.business_type EQ 2>
<cfquery username="edebt" password="D7Oe+lus" name="Get_biz" dataSource="#request.dsn#" dbtype="ODBC" >
Select *
From Businesses
WHERE business_type = 3
AND head_office_id = #business_id_Value#
</cfquery>
<cfquery username="edebt" password="D7Oe+lus" name="Get_biz_root" dataSource="#request.dsn#" dbtype="ODBC" >
Select creditor
From Businesses
WHERE Business_id = #business_id_Value#
</cfquery>
<tr>
<TD class="contactadminsmall" valign="top" width="180" align="left"><nobr><span class="redtext">*</span>Creditor:</td>
<td class="contactadminsmall" align="left" valign="top">
<select name="business_id" class="button">
<option value="#business_id_Value#" Selected>#Get_biz_root.creditor#</option>
<cfloop query="Get_biz">
<option value="#business_id#">#creditor#</option>
</cfloop>
</select>
</td>
</tr>
<cfelse>
<input type="hidden" name="business_id" value="#business_id_Value#">
</cfif>
<TR>
<TD colspan="2" valign="top">
<INPUT type="submit" name="btnEdit_OK" value=" OK " class="button">
<CFIF ParameterExists(URL.debtor_id)>
<cfquery name="z_checker" datasource="#request.dsn#" maxrows=1 dbtype="ODBC">
SELECT *
FROM INVOICE_SETS
WHERE INVOICE_SETS.debtor_id = #url.debtor_id#
</cfquery>
<cfif NOT z_checker.recordcount GT 0>
<input type="button" name="btnView_Delete" value="Delete" onclick="goDelete();" class="button">
<cfelse>
<input type="button" name="btnView_Delete" value="Delete" onclick="goDeleteFail();" class="button">
</cfif>
</cfif>
<!--- <INPUT type="submit" name="btnEdit_Cancel" value="Cancel"> --->
</TD>
</tr>
</CFOUTPUT>
</cfFORM>
</TABLE>
-------------------------------------------------------------------------------------
