Example Number 4.xx

Example Name: SampleDatabaseMethods.cfc

Description: Dummy methods to run the SampleDatabaseMethods.fla file for ColdFusion

Language: CFML

Version: 1.0.0

Code:

<cfcomponent>
     <cffunction name="addEmployee" returntype="numeric" access="remote">
     <cfargument name="dummy" type="string" default="">
          <cfloop index="i" from="1" to="100000"></cfloop>
          <cfreturn 1 />
     </cffunction>
     <cffunction name="updateEmployee" returntype="boolean" access="remote">
     <cfargument name="dummy" type="string" default="">
          <cfreturn true />
     </cffunction>
     <cffunction name="deleteEmployee" returntype="boolean" access="remote">
     <cfargument name="dummy" type="string" default="">
          <cfreturn true />
     </cffunction>
</cfcomponent>

Download code text

Download chapter example files