I've been stuck on this for a good portion of the last two days, and I'm
completely frustrated.
I have written the following function that calls an Oracle sequence:
<cffunction name="getNewID" returntype="numeric">
<cfquery name="qGetNewID" datasource="#variables.DSN#"
username="#varibles.UN#" password="#variables.PW#">
SELECT ESERVICES.CGI_ID_SEQ.NEXTVAL as newID
FROM DUAL
</cfquery>
<cfreturn qGetNewID.newID />
</cffunction>
To test whether the above function works I placed it in a regular .cfm file
and called it within the same file as follows:
<cfset variables.trackingNumber = getNewID() />
No problems.
When I take the same function and place it in a cfc as a private method and
call it from within another setter function in the same cfc...
<cffunction name="setVariables">
....
<cfset variables.trackingNumber = getNewID() />
....
</cffunction>
It fails with the following error "Element newID is undefined in qGetNewID."
Anyone have any idea what I am doing wrong?
Thanks,
Nate
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]