RecordSet.getColumnNames( )


RecordSet.getColumnNames( ) Method Flash 6

retrieves column names of a recordset
   myRecordSet   .getColumnNames( ) 

Returns

A comma-separated list of column names in the RecordSet .

Description

The getColumnNames( ) function provides an easy way to retrieve the column names in the recordset. If you think of the recordset as a two-dimensional array of rows and columns. The rows are records referenced by an index number. The columns are the recordset fields referenced by the column names that are contained in each record. The names returned in the getColumnNames( ) method are listed in the order that they appear in the recordset.

Example

The following code gets the list of columns and converts it into an array before tracing each name in the Output window:

 var myColumns = myRecordset.getColumnNames( ); var myColumnArray = myColumns.split(","); for (var i=0; i < myColumnArray.length; i++) {   trace(myColumnArray[i]); } 

See Also

RecordSet.getLength( ) ; Chapter 4



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