Product Documentation

FairCom Java & .NET Stored Procedures

Previous Topic

Next Topic

DhSQLResultSet.insert

Inserts the currently-active row into a procedure’s result set.

Format

public void insert()

Returns

None

Parameters

None

Throws

DhSQLException

Example


CREATE PROCEDURE get_sal2 ()

RESULT (

empname CHAR(20),

empsal NUMERIC,

)

IMPORT

import java.math.BigDecimal;

BEGIN

StringBuffer ename = new StringBuffer (20) ;

BigDecimal esal = new BigDecimal () ;

SQLCursor empcursor = new SQLCursor (

"SELECT name, sal FROM emp " ) ;

empcursor.open () ;

do

{

empcursor.fetch ();

if (empcursor.found ())

{

ename = (String)empcursor.getValue (1, CHAR);

esal = (BigDecimal)empcursor.getValue (2, NUMERIC);


SQLResultSet.set (1, ename);

SQLResultSet.set (2, esal);

SQLResultSet.insert ();

}

} while (empcursor.found ()) ;

empcursor.close () ;

END

Note: The resultset parameter empname in the procedure above should be of type CHAR in ANSI versions of FairCom DB SQL.

TOCIndex