|
Java Examples for ASE 12.5 |
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Routines3
A class with an orderedEmpsmethod for an SQLJ create procedure that returns an SQL result set.
Constructor Summary | |
Routines3()
|
Method Summary | |
static void |
orderedEmps(int regionParm,
java.sql.ResultSet[] rs)
An example method that returns a result set. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public Routines3()
Method Detail |
public static void orderedEmps(int regionParm, java.sql.ResultSet[] rs) throws java.sql.SQLException
This method is intended for an SQLJ create procedure such as the following:
create procedure rankedemps(region integer) dynamic result sets 1 language java parameter style java external name 'Routines3.orderedEmps(int)'
That SQLJ procedure "rankedemps" would be called as a stored procedure by an SQL client. For example, a Java client such as the following:
java.sql.CallableStatement stmt = conn.prepareCall({call rankedemps(?)}); stmt.setInt(1,3); ResultSet rs = stmt.executeQuery(); while (rs.next()) { String name = rs.getString(1); int.region = rs.getInt(2); BigDecimal sales = rs.get.BigDecimal(3); System.out.print(Name = + name); System.out.print(Region = + region); System.out.print(Sales = + sales); System.out.printIn(): }
The main method of the Java class CallRankedEmps contains such a call of "rankedemps".
int
- an int with a region valuers
- the result set that will be returned on the SQLJ call
|
Java Examples for ASE 12.5 |
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |