RecordSet.getLength( )


RecordSet.getLength( ) Method Flash 6

returns the length of a recordset
   myRecordSet   .getLength( ) 

Returns

An integer specifying the number of rows in the RecordSet object.

Description

The getLength( ) method returns an integer that contains the number of rows in the RecordSet object. This length is always be one more than the highest index number in the recordset. For example, a recordset that has 10 rows with index numbers from to 9 has a length of 10 .

Example

The following code gets the length of the RecordSet object and puts it into a variable:

 var myRecordsetLength = myRecordset_rs.getLength( ); 

The length is typically used to loop through all records in a recordset, such as:

 var myRecordsetLength = myRecordset_rs.getLength( ); for (var i; i < myRecordsetLength; i++) {   trace(myRecordset_rs.getItemAt(i)); } 

See Also

Chapter 4, "Loops and Repeated Operations" in Chapter 12



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