Try OpenEdge Now
skip to main content
SQL Reference
JDBC Reference : Java Class Reference : DhSQLResultSet : DhSQLResultSet.set : Throws
 
Throws
DhSQLException

Example

This code fragment illustrates SQLResultSet.Set:
CREATE PROCEDURE get_sal2 ()
RESULT (
empname CHAR(20),
empsal NUMERIC,
)BEGIN
String ename = new String (20) ;
BigDecimal esal = new BigDecimal () ;
SQLCursor empcursor = new SQLCursor (
"SELECT name, sal FROM emp " ) ;

empcursor.Open () ;
do
{
empcursor.Fetch ();
if (empcursor.found ())
{
empcursor.getValue (1, ename);
empcursor.getValue (2, esal);
SQLResultSet.Set (1, ename);
SQLResultSet.Set (2, esal);
SQLResultSet.Insert ();
}
} while (empcursor.found ()) ;
empcursor.close () ;
END