2 Replies Latest reply on Apr 20, 2006 10:36 AM by sneakyimp

    can you *copy* a recordset?

    sneakyimp Level 2
      I'm using flash remoting to retrieve a pretty large data recordset from my server. Then, I'm displaying that recordset on two different datagrids which have to be able to sort the data independently. If they use the same recordset, then sorting one will sort the other.

      I currently have them set up to each load the same recordset independently, but this is currently a list of 1800 products! it's really taxing bandwidth-wise.

      Is there any way to 'copy' the results of a recordset?
        • 1. Re: can you *copy* a recordset?
          sneakyimp Level 2
          ok since i'm not getting any help, i figure I'll post some of my efforts to hopefully encourage some smart person to help me here....

          I googled and googled and found this:
          Working with Recordsets

          Tantalizing hints there. the RecordSet.filter() function is supposed to return a *copy* of a Recordset.

          BUT, there are problems with that as described here:

          http://www.flashant.org/index.php?p=21&more=1&c=1

          Apparently the filter() function retains references to the original object. SHAME on Macromedia!

          At any rate, it appears as though I can add a RecordSet.copy() method to the RecordSet object itself by editing the RecordSet.as files in the Macromedia install directory. I don't know is this will work, and I'm wary of doing something that would not work on everybody's flash player, but I was thinking I could add this to the RecordSet.as file right after the filter() prototype.

          Does anyone know if that will work??
          • 2. Re: can you *copy* a recordset?
            sneakyimp Level 2
            in addition to the main RecordSet.as file (about 18k) in Flash\en\First Run\Include, there is a RecordSet.as in Flash\en\First Run\Include\Classes.

            I assume I'd need to declare the new method there, no?

            Also, if i change *my* RecordSet.as files, will my flash movies still work for everyone else of would I be declaring something the flash player cannot handle?