The object is to insert a row into a recordset. It shouldn't matter where you insert it. My method creates a new query with the row in the right spot leaving the rest of the row empty if required. If you use arrayAppend() for your example, I would have to call arrayAppend() 12 times before I could set the array position of 15. Using arrayResize() I can resize the array in one go and just set the value of the array.
Becoming clearer? -----Original Message----- From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Scott Sent: Thursday, 15 May 2008 12:15 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: queryAddRow I should also add that with your method of not using ArrayAppend, creates empty records when doing this. Can you now see why I asked the original question? Or was that the desired effect you wanted? qry = queryNew(""); queryAddColumn(qry, "fruit", listToArray("banana,apple,orange")); queryAddColumn(qry, "vegies", listToArray("carrot,cucumber,tomato")); newRow = structNew(); newRow["fruit"] = "Test"; newRow["vegies"] = "Andrew"; qry = queryInsertRow( qry, 15, newRow); Andrew Scott Senior Coldfusion Developer Aegeon Pty. Ltd. www.aegeon.com.au Phone: +613 9015 8628 Mobile: 0404 998 273 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~----------~----~----~----~------~----~------~--~---