• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

RecordSet.getLength( ) Method > RecordSet.getLength( ) Method

Name

RecordSet.getLength( ) Method

Synopsis

                     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 0 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));
}

PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint