You want to create and populate a recordset.
Return a recordset from Flash Remoting,
or create a recordset using the constructor
and populate it using the
RecordSet.addItemAt( ) methods.
Most often, recordsets are returned to Flash movies from Flash
Remoting. Recordsets cannot be meaningfully passed back to an
application server portion of a Flash Remoting application.
Therefore, it is rarely necessary to create recordsets with
ActionScript. However, recordsets can be a convenient way of storing
DataGlue class, the data within a recordset
can be used to populate many UI components.
The constructor function for recordsets requires an array of column names as a parameter, as follows:
// Make sure to include
NetServices.aswhenever you work with recordsets, although // for this simple example, including
RecordSet.aswould suffice. #include "NetServices.as" // Create a new recordset with three columns: COL0, COL1, and COL2. rs = new RecordSet(["COL0", "COL1", "COL2"]);
Once you have created a recordset using the constructor, you can add
records to it using the
addItem( ) and
addItemAt( ) methods. Both methods require a
record object parameter. A record object is
merely an object (an instance of the
class) in which the property names match the column names of the
addItemAt( ) method differs from
addItem( ) method in that
addItemAt( ) inserts a new record at a specific ...