Hi,
I have a page that is running two update queries and both make use of a UDF
which is cfincluded in the Application.cfm
The first query uses the function and updates the db with no problem but
the second call to the function thrwows the following error:
Error Diagnostic Information
An error occurred while evaluating the expression:
"#fixedDate(attributes.webDate)#"
Error near line 56, column 95.
The symbol you have provided (fixedDate) is not the name of a function...
Why am I able to call the function the first time and then not a second time?
Is this a bug with UDF's?
The two queries look like:
This one works:
<cfquery name="updateReleaseManagerPress" datasource="#request.dsn#"
dbtype="ODBC">
UPDATE releaseManager
SET releaseDate = <cfif attributes.immediateRelease EQ 1
AND attributes.isReleased NEQ 1><cfqueryparam cfsqltype="CF_SQL_DATE"
value="#Now()#"><cfelse><cfqueryparam cfsqltype="CF_SQL_DATE"
value="#fixedDate(attributes.releaseDate)#"></cfif>,
releaseTime = <cfqueryparam
cfsqltype="CF_SQL_TIME" value="#attributes.releaseTime#">,
immediateRelease =
#attributes.immediateRelease#,
releasedBy = '#session.currentuser.realname#',
processedDate = <cfqueryparam
cfsqltype="CF_SQL_DATE" value="#Now()#">,
isReleased = 1
WHERE releaseid = '#attributes.releaseid#'
</cfquery>
This throws the error:
<cfquery name="updateReleaseManagerWeb" datasource="#request.dsn#"
dbtype="ODBC">
UPDATE releaseManager
SET webRelease = #attributes.webRelease#,
webDate = <cfif attributes.webDate IS NOT
""><cfqueryparam cfsqltype="CF_SQL_DATE"
value="#fixedDate(attributes.webDate)#"><cfelse><cfqueryparam
cfsqltype="CF_SQL_DATE" value="#Now()#"></cfif>
WHERE releaseid = '#attributes.releaseid#'
</cfquery>
attributes.releaseDate = 03/02/03
attributes.webDate = 3/2/2003
Thanks
Dave
--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]
- [ cf-dev ] XML problems with XMLNS Tim Blair
- RE: [ cf-dev ] UDF problem David Phipps
- RE: [ cf-dev ] UDF problem Snake Hollywood
- RE: [ cf-dev ] UDF problem Dave Phipps
