Cursor.columnName

NES2+Syntax

							cursor.columnName

Description

The columnName property of the Cursor object is an array of objects that corresponds to the name of the columns in the cursor.

Example

Listing 8.29 shows a cursor object being created. The various values are then written to the page using the columnName property as their reference.

Listing 8.29 Using the columnName Property
 <SERVER> var currRow = myConn.cursor('SELECT areacode,phone,name FROM employees); // Write each person's name and phone number to the page in the form: // "<name>'s phone number is (<areacode>) <phone>" while(currRow.next()){ write(currRow.name + "'s phone number is (" + currRow.areacode + ") "); write(currRow.phone + "<BR>"); } // Close the cursor currRow.close(); ...

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.