Resultset.columnName()

NES3+Syntax

							resultset.columnName(num)

Description

The columnName() method of the Resultset object takes the zero-based indexed number location, num, passed to the method and returns the name of the column in that location. Note that these names are not returned in any specific order unless you order them as such. Successive calls to the method, however, will return all the columns. See the example for more information.

Example

Listing 8.113 has two result sets. One of the sets returns specific column names and the other returns all columns. See the comments in the code for the output.

Listing 8.113 Using the columnName() Method to Return the Names of the Columns in a Table
 <SERVER> // Create a pool of connections ...

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.