Skip to main content
Known Participant
September 23, 2010
Answered

<cfquery> return type

  • September 23, 2010
  • 1 reply
  • 1205 views

Hi,

<cfcomponent>

<cffunction name="saveInfo" access="public" returntype="query">
     <cfargument name="Employee_ID" type="string" required="no">
     <cfargument name="Address" type="any"  required="no">
  
     
         <cfquery name="EmployeeInfo" datasource="Employees_data">
         Update Employees_Data_Info

         SET Address = '#arguments.Address#'

         where Employee_ID = '#arguments.Employee_ID#'
         </cfquery>
   
  <cfreturn EmployeeInfo>
 
</cffunction>

</cfcomponent>

This is throwing teh following error.

faultCode:Server.Processing faultString:'Unable to invoke CFC - Variable EmployeeInfo is undefined.' faultDetail:''

Can anyone suggest why it is happening...

Thanks...

    This topic has been closed for replies.
    Correct answer Adam Cameron.

    Update queries do not return a record set...

    --

    Adam

    1 reply

    Adam Cameron.Correct answer
    Inspiring
    September 23, 2010

    Update queries do not return a record set...

    --

    Adam

    RosieGpAuthor
    Known Participant
    September 23, 2010

    thanks adam