I need to rewrite the code so it looks like a function 
<cfif NOT StructIsEmpty(form)>
<cfcontent type="text/xml; charset=UTF-8" reset="Yes" />
<cfloop index="variables.i" from="1" to="#ListLen(form.categoryname)#">
                         <cfset variables.thisCheckbox = 
ListGetAt(form.categoryname,variables.i)>
           <cftry>
                 <cfstoredproc procedure="addCategory" 
datasource="HotBanana_Manager">
                                <cfprocparam type="in" 
cfsqltype="cf_sql_varchar" value="#variables.thisCheckbox#">        
                      <cfprocparam type="in" cfsqltype="cf_sql_varchar" 
value="#session.schoolcode#"> 
                                  <cfprocparam type="in" cfsqltype="cf_sql_bit" 
value="#form.hidden#"> 
          
    </cfstoredproc>
             <cfcatch type="database">
              There was a database error!
            </cfcatch>
         </cftry>
         </cfloop>







</cfif> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:291346
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to