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 has the following behavior:

Application server

Runtime behavior

ASP

Calls the Move method of the RecordSet object. Because ASP does not support an absolute move operation, the Web Targets Move converts the row you specify into a relative number before calling the ASP Move function.

JSP

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. 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");
		}

To use the same example in a JSP target, you must declare “myquery” as a variable of type String, “mycursor” as a variable of type PSCursorClass, and “myconnect” as a variable of type PSConnectionClass.