Move

Description

Moves to an absolute row in a cursor.

Applies to

PSCursorClass objects

Syntax

cursorobject.Move( rownumber )

Argument

Description

cursorobject

A variable that contains a reference to an instance of PSCursorClass.

rownumber

An absolute row number in the cursor. The array of rows starts with index zero.

Returns

Boolean. Returns true if the end of the cursor has been reached, and false if it has not.

Usage

At runtime, Move calls the absolute method on the ResultSet object to move the cursor to the entered rownumber. The Move method can work only if the JDBC driver you use supports the result set types TYPE_SCROLL_INSENSITIVE and TYPE_SCROLL_SENSITIVE.

Examples

Example 1

The following example moves to row 10 of the “mycursor” object. In this example, “myquery” is a variable of type String, “mycursor” is a variable of type PSCursorClass, “myconnect” as a variable of type PSConnectionClass, and “eof” is a variable of type boolean. Because the row index is zero-based, the Move function specifies 9 as the row number:

myquery = "SELECT customer.cust_id, customer.cust_name
		FROM DBA.customer"; 
mycursor = myconnect.CreateCursor(myquery);
eof = mycursor.Move(9);
if ( eof == true )
		{
		psDocument.Write ("That row does not exist");
		}