Recordset.numfields — get the number of fields in a recordset
int Recordset.numfields ( |
); |
Example 72. Recordset.numfields 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”