Resultset.columns()

NES3+Syntax

							resultset.columns()

Description

The columns() method of the Resultset object returns the number of columns in the result set on which it is invoked. If the SQL used to create the result set specifies a set number of columns to return, that is the number returned by this method.

Example

Listing 8.114 shows how you can return all the column names of the columns in your result set.

Listing 8.114 Using the columns() Method to Determine How Many Columns Are in the Result Set Before Writing Them to the Page
 <SERVER> // Run the stored procedure var myStproc = myConn.storedProc("sp_employees"); // Store the result set var myResultSet = myStproc.resultSet(); // Writes all column names stored in the result set to ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.