What happens if you change it from a private method to a public one? i'm under the impression that private methods are only available from within the object they are written in.
i've got a similar getID method working just fine, but it's in a public method. > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Behalf Of [EMAIL PROTECTED] > Sent: Friday, November 07, 2003 8:55 PM > To: [EMAIL PROTECTED] > Subject: [CFCDev] Problems with Oracle sequence in CFC > > > 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] ---------------------------------------------------------- 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]
