Hi all, just looking for ideas.

 

I’ve got a master/detail order form that will obviously be the presentation of an “order” CFC. It’s really a performance/best practices Q on where to loop thru the details for the inserts/updates.

 

<psedocode type=”lazy”>

// master part of the processing

objOrder.CreateDate = form.CreateDate

objOrder.DueDate = form.DueDate

objOrder.Supplier = form.Supplier

objOrder.customerID = form.customerID

// etc…

 

success = objOrder.AddNew()

 

 

// what do people think I should do about the detail part (order line items)

 

for each line item entered in the form

            success = objOrder.AddNewDetail(form.qty, form.prodCode, form.refNum)

            // run method many times

loop many times

 

 

// OR ====================

 

arrDetail =  new array()

for each line item entered in the form

            add new array element

            add new struct to array

            struct.qty = form.qty

            struct.prodCode = form.prodCode

            struct.refNum = form.refNum

loop many times

 

success = objOrder.AddNewDetails(arrDetail)

//run method once (unpacks the array of structs and inserts)

 

 

any suggestions?

 

thanx

barry.b

 

 

 

 

 

 

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

Reply via email to