RecordSet.setField( )


RecordSet.setField( ) Method Flash 6

sets a field within a record
   myRecordSet   .setField(   index   ,   fieldName   ,   value   ) 

Arguments

index

The index number of the recordset row that contains the field to be replaced .

fieldName

The field name of the field that you want to replace the contents of.

value

The value that you are setting the field to.

Description

The setField( ) method replaces the contents of a single field within a row, with no effect on the other fields, allowing for finer control over updating than replaceItemAt( ) .

Example

The following code creates a recordset and then replaces the email address in the first record:

 #include "RecordSet.as" var myRecordset_rs = new RecordSet(["First", "Last", "Email"]); myRecordset_rs.addItem({First:"Tom", Last:"Muck", Email:"tom@tom-muck.com"}); var email = 'jacksplat@tom-muck.com'; myRecordset_rs.setField(0,"Email", email); trace (myRecordset_rs.getItemAt(0).Email; 

See Also

RecordSet.replaceItemAt( )



Flash Remoting
Flash Remoting: The Definitive Guide
ISBN: 059600401X
EAN: 2147483647
Year: 2003
Pages: 239
Authors: Tom Muck

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net