Recordset.fieldname — get the name of a particular field
| string Recordset.fieldname ( | index ); | 
| int | index; | 
Returns the name of the column indexed by index. index is a zero based column index. Use the Recordset.numfields() method to get the number of columns in a recordset.
Example 67. Recordset.fieldname Example
// Print the field names
for(int i = 0; i < rs.numfields(); i++)
{
    %>
    <p>Column #<%=i + 1%> is called '<%=htmlencode(rs.fieldname(i))%>'</p>
    <%
}
    Data sources and database access in RSP is explained in the section called “Accessing Databases”