Visual InterDev

getName Method

      Applies To

Returns the name of a field from the fields collection.

Syntax

object.fields.getName(nIndex)

Parameters

object

A Recordset script object.

nIndex

An integer that specifies the index of the field whose name is returned. nIndex is zero-based.

Remarks

The fields collection is a child object of the Recordset script object.

Use the getValue method to return the value of the field.

Example

Using DHTML and JavaScript, add the names of the fields from a recordset to a list box.

for ( i = 0; i < myRecordset.fields.getCount(); i++)
{
     myListbox.addItem(myRecordset.fields.getName(i));   
}