I think things like this are subjective. However, I'm always one who favors pushing the details of something (especially something that could be used in more than one place) into some central location as often as possible.
So maybe you could pass an array of the records you want to update to the CFC by calling a method like doMultipleInsert( myArray ). Then, within doMultipleInsert(), you can loop over the array and call another method like doIndividualInsert( thisRecord ) to do each individual insert. So not only can you call doMultipleInsert() anywhere else you need to, you can also always call doIndividualInsert() if you ever need to insert only 1 record. Regards, Brian -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brent Nicholas Sent: Thursday, June 17, 2004 10:54 AM To: [EMAIL PROTECTED] Subject: [CFCDev] Data passing to CFC's Hello all - What is the best way to go about this, or is it just a matter of personal choice? I am using a CFC to insert records of employees(emp_id), departments(dept_id), and a related RecordSequence(ItemSeq). The interface may pass one set (1 employee, 1 dept for them, and the related record item) ex: emp_id = BN2 / dept_id=951 / ItemSeq=45 or many sets (5 employees, a dept for each one, and the common related record item) emp_id = BN2 / dept_id=951 / ItemSeq=45 emp_id = SKI / dept_id=456 / ItemSeq=45 emp_id = JPK / dept_id=912 / ItemSeq=45 emp_id = LKH / dept_id=311 / ItemSeq=45 emp_id = CAP / dept_id=952 / ItemSeq=45 The question is: Should I loop over the data, calling the cfc each time to insert one record, or place the contents in an array of structures and pass the whole thing to the CFC and let it do the work? or other? Thanks, Brent Nicholas - EclecticDetroit, LLC. http://www.EclecticDetroit.com ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com). An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED] ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com). An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
