Cursor.updateRow()

NES2+Syntax

							cursor.updateRow(table)

Description

The updateRow() method of the Cursor object uses an updateable cursor and updates the current row in the specified table of the cursor object. If the insert was successful, 0 is returned; otherwise, it returns an error code that can be obtained by using the majorErrorCode() and majorErrorMessage() methods of the Connection or database objects.

Example

Listing 8.36 creates a Cursor object and selects all rows. The updateRow() method is then used to update the current row with three specified values.

Listing 8.36 Updating a Row from the Cursor Using the updateRow() Method
 <SERVER> // Assign the user submitted ID to the client object as properties client.uid = request.uid; ...

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.