Product Documentation

FairCom Java & .NET Stored Procedures

Previous Topic

Next Topic

SQLCursor

Description

Methods of the SQLCursor class retrieve rows of data from a database or another stored procedure’s result set.

Constructors

SQLCursor (String statement)

Parameters

statement

A FairCom DB SQL statement that generates a result set. Enclose the statement in double quotes. The FairCom DB SQL statement is either a SELECT or CALL statement:

  • A SELECT statement queries the database and returns data that meets the criteria specified by the query expression in the SELECT statement.
  • A CALL statement invokes another stored procedure that returns a result set specified by the RESULT clause of the CREATE PROCEDURE statement.

Throws

DhSQLException

The following excerpt from a stored procedure instantiates an SQLCursor object called cust_cursor that retrieves data from a database table.

Example


SQLCursor empcursor = new SQLCursor ("SELECT name, sal FROM emp " ) ;


The following excerpt from a stored procedure instantiates an SQLCursor object called cust_cursor that calls another stored procedure.

Example with Nested Stored Procedure


SQLCursor cust_cursor = new SQLCursor ("CALL get_customers (?) ") ;


TOCIndex