A-ha! Thank you, Sean! I knew it was something obvious. I admit I don't var-scope my query variables, though I usually name them appropriately (createQuery, createAddressQuery etc.) Lazy programming, it gets you ever time. :)
On Wed, 9 Mar 2005 14:32:58 -0500, Bill Rawlinson <[EMAIL PROTECTED]> wrote: > dont feel bad though - alot of people have made this mistake in the > past (myself included)! > > > On Wed, 9 Mar 2005 11:05:00 -0800, Sean Corfield <[EMAIL PROTECTED]> wrote: > > On Wed, 9 Mar 2005 13:45:05 -0500, Ken Dunnington > > <[EMAIL PROTECTED]> wrote: > > > Yes, create() and createAddress() (as well as update and > > > updateAddress) are all in the same cfc. It's a bit lengthy, but > > > > Your problem is you are not var-declaring the variables into which you > > store queries: > > > > > <cffunction name="create" output="false" access="private" > > > returnType="user" hint="Insert a new user into the database"> > > > <cfargument name="bean" type="user" required="yes" > > > hint="User object" /> > > > <cfset var billing = arguments.bean.getBilling() /> > > > <cfset var shipping = arguments.bean.getShipping() /> > > > <cftransaction> > > > <cfquery name="create" datasource="#getDSN()#"> > > > > This stores the result in variables.create making this.create() > > inaccessible inside the object. > > > > > <cffunction name="createAddress" output="false" > > > returnType="address" > > > access="private" hint="Create a new address entry"> > > > <cfargument name="address" type="address" required="true" > > > /> > > > <cftransaction> > > > <cfquery name="createAddress" > > > datasource="#getDSN()#"> > > > > This stores the result in variables.createAddress making > > this.createAddress() inaccessible inside the object. > > > > etc etc. > > > > You *MUST* var-declare your query results: > > > > <cfset var queryResult = 0 /> > > <cfquery name="queryResult" ..> > > ... > > </cfquery> > > > > This is a problem in every method you have containing <cfquery> > > > > Hope that helps! > > -- > > Sean A Corfield -- http://www.corfield.org/ > > Team Fusebox -- http://www.fusebox.org/ > > Got Gmail? -- I have 50, yes 50, invites to give away! > > > > "If you're not annoying somebody, you're not really alive." > > -- Margaret Atwood > > > > ---------------------------------------------------------- > > You are subscribed to cfcdev. To unsubscribe, send an email to > > [email protected] with the words 'unsubscribe cfcdev' as the subject of > > the email. > > > > CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting > > (www.cfxhosting.com). > > > > An archive of the CFCDev list is available at > > www.mail-archive.com/[email protected] > > > > > > -- > [EMAIL PROTECTED] > http://blog.rawlinson.us > > I have 47! gmail invites,want one? > > ---------------------------------------------------------- > You are subscribed to cfcdev. To unsubscribe, send an email to > [email protected] with the words 'unsubscribe cfcdev' as the subject of the > email. > > CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting > (www.cfxhosting.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 words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
