<<

Contents

Search

>>

 

JDBC_EXTFETCH

 

 

Function

 

 

Syntax:

JDBC_EXTFETCH(<File Number>,<Mode>,<Number of Row>)

 

<File Number>

= <NUM-EXPRESSION>

<Mode>

= <NUM-EXPRESSION>

<Number of Row>

= <NUM-EXPRESSION>

 

 

Meaning:

Fetches a data row from the result table and fills all JDBC_JOIN variables.

 

With JDBC_EXTFETCH the data of the result table can not only be scrolled forward once, but the cursor can be set to any row and forward- / backward scrolling is possible.

 

Note: After a successful Select command only JDBC_FETCH or JDBC_EXTFETCH can be used.

 

Note: JDBC_EXTFETCH is not supported by all JDBC drivers. In this case the function returns the error message "Driver not capable".

 

JDBC_EXTFETCH returns information about the fetched row:

 

0

The row has been successfully read and is updated.

1

The row has been changed since it was last read.

2

The row has been deleted after it was last read.

3

The row has been added since it was last read. 

4

An error occurred when fetching the row.

-1

Error: The variable OK contains the error number and the function JDBC_GET_LAST_ERROR$ returns the error text.

 

Parameter:

File Number

Number of JDBC database

 

Mode

Specifies the result set to be fetched:

1

Get first result set

2

Get last set

3

Get next set

4

Get previous set

5

Set cursor absloutely on row <Number of row>

6

If <Number of row> > 0: set cursor by <Number of row> forward.

If <Number of row> < 0: set cursor by <Number of row> backward.

otherwise

Get next result set

 

Note: With dynamic cursors mode 5 cannot be used. With Forward-Only-Cursorn only mode 3 can be used.  

 

Number of Row

Row number for mode = 5 and 6

 

Sample:

H% = JDBC_EXTFETCH(2,0,0)

IF H% = -1

THEN ERRORMES = JDBC_GET_LAST_ERROR$

ENDIF

 

See also:

JDBC_FETCH

JDBC_EXEC_DIRECT

JDBC_EXEC_PREPARED

JDBC_SET_CURSORTYPE

JDBC_JOIN