Yes. So I have to put the object in onRequestStart or top of the page to init?
On 07/06/07, AJ Mercer <[EMAIL PROTECTED]> wrote: > > had the application already been run before you added the create object? > If so, you will need to restart the application (or bounce the CF service) > so the OnApplicationStart function gets executed > > On 6/7/07, George Lu <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > I create an object in Application.cfc and put it in the application > > scope. When I use it in other pages it comes up this error: > > Element SURVEYDAO is undefined in a Java object of type class [ > > Ljava.lang.String; referenced as > > The object in application.cfc: > > <cffunction name="OnApplicationStart"> > > <cfset Application.surveyDAO = createObject("component", > > variables.componentPath & ".components.surveyDAO").init(variables.dsn) > > /> > > <cfset Application.hrSurveyObj = CreateObject("component"," > > CFC.DataMgr").init("HR","MSSQL") /> > > </cffunction> > > > > The code causing the error: > > <cfset Application.surveyDAO.delete(url.userID) /> > > > > Please help! > > > > George > > > > > > > > > > > -- > If you are not living on the edge, > You are taking up too much space. > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~----------~----~----~----~------~----~------~--~---