<!--- This view-only example illustrates usage
      of StructCopy. --->
<P>This file is similar to addemployee.cfm, which is called
by StructNew, StructClear, and StructDelete. To test this file,
copy the StructCopy function to the appropriate place
in addemployee.cfm.
<P>
To run this snippet
under UNIX, you must add employee ID generation logic.
<!--- 
<cfswitch expression="#ThisTag.ExecutionMode#">
   <cfcase value="start">
      <CFIF StructIsEmpty(attributes.EMPINFO)>
        <CFOUTPUT>Error. No employee data was passed.</cfoutput>
          <CFEXIT METHOD="ExitTag">
        <cfelse>
          <CFSET tempStruct = StructCopy(EMPINFO)>
          <CFQUERY NAME="AddEmployee" DATASOURCE="cfsnippets">
            INSERT INTO Employees
                (FirstName, LastName, Email, Phone, Department)
              VALUES 
                <CFOUTPUT>
                  (
                    ‘#StructFind(attributes.tempStruct, "firstname")#’ ,
                    ‘#StructFind(attributes.tempStruct, "lastname")#’ ,
                    ‘#StructFind(attributes.tempStruct, "email")#’ ,
                    ‘#StructFind(attributes.tempStruct, "phone")#’ ,
                    ‘#StructFind(attributes.tempStruct, "department")#’
                   )
                </cfoutput> 
          </cfquery>
        </cfif>
      <CFOUTPUT><HR>Employee Add Complete
         <P>#StructCount(attributes.tempStruct)# columns added.
           </cfoutput>
   </cfcase>
</cfswitch> --->
