Hello,

I'm having some issues with the new fourq setData.cfm
(fourq/_fourq/setData.cfm) posted to the list by Brendan last week. The
following issues have cropped up while trying to add a rule to a
container. 



ISSUE 1:

If the final property of the aProps array is of the type array, setData
fails with the following error:

##################################################################

Macromedia][Oracle JDBC Driver][Oracle]ORA-01747: invalid
user.table.column, table.column, or column specification  
  
The error occurred in E:\fourq\_fourq\setData.cfm: line 144
Called from E:\fourq\fourq.cfc: line 112
Called from E:\farcry_core\admin\navajo\editContainer.cfm: line 324
Called from E:\fourq\_fourq\setData.cfm: line 144
Called from E:\fourq\fourq.cfc: line 112
Called from E:\farcry_core\admin\navajo\editContainer.cfm: line 324
 
142 :           </cfif>
143 :   </cfloop>
144 :   WHERE objectID = <cfqueryparam value="#objectID#"
cfsqltype="CF_SQL_VARCHAR">
145 : </cfquery>
146 :   

 

------------------------------------------------------------------------
--------
 
SQL    UPDATE farcry_fbhc.container SET label = (param 1) , bShared =
(param 2) , WHERE objectID = (param 3)  
DATASOURCE   farcry_fbhc 
VENDORERRORCODE   1747 
SQLSTATE   HY000 
 
##################################################################

Basically an extra comma is being added before WHERE in the SQL
statement. As a quick hack I changed line 141 to read:

<cfif i neq arrayLen(aProps) and aProps[i].type neq "array" and
aProps[i+1].type neq "array">, </cfif>

I haven't thought out the implications of this change, it seems like way
to much of a hack to be correct, but it works for now.



ISSUE 2:

With issue one corrected, there seems to be an issue with boolean data
types. Trying to update a boolean produces this error.

##################################################################

Error Executing Database Query.  
Invalid data for CFSQLTYPE CF_SQL_INTEGER.  
  
The error occurred in E:\fourq\_fourq\setData.cfm: line 145
Called from E:\fourq\fourq.cfc: line 112
Called from E:\farcry_core\admin\navajo\editContainer.cfm: line 324
Called from E:\fourq\_fourq\setData.cfm: line 145
Called from E:\fourq\fourq.cfc: line 112
Called from E:\farcry_core\admin\navajo\editContainer.cfm: line 324
 
143 :           </cfif>
144 :   </cfloop>
145 :   WHERE objectID = <cfqueryparam value="#objectID#"
cfsqltype="CF_SQL_VARCHAR">
146 : </cfquery>
147 :   

 

------------------------------------------------------------------------
--------
 
SQL    UPDATE farcry_fbhc.container SET label = (param 1) , bShared =
(param 2) WHERE objectID = (param 3)

##################################################################

As a fix I changed line 126 to read:

#propertyName# = <cfqueryparam value="#YesNoFormat(propertyValue)#"
cfsqltype="CF_SQL_BIT">

I've always used CF_SQL_BIT for booleans, and it seems to work with
Access and Oracle. I haven't tested on MySQL or SQL Server.  



ISSUE 3:

With the following two issues corrected, I am having problems adding an
External Links Rule. The update form is failing with the following
error:

##################################################################

Element OBJECTID is undefined in STOBJ.  
 
  
The error occurred in E:\farcry_core\packages\rules\ruleLinks.cfc: line
51
 
49 :            <form action="" method="POST">
50 :            <table width="100%" align="center" border="0">
51 :            <input type="hidden" name="ruleID"
value="#stObj.objectID#">
52 :            <tr>
53 :                    <td width="20%" colspan="1" align="right">

##################################################################

I've taken a quick look at the update method in the ruleNews.cfc and it
seems nearly identical to ruleLinks's update method. Does anyone have
any idea why this might not be working?



Thanks in advance.

--Nathan



 

---
You are currently subscribed to farcry-dev as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

Reply via email to