Using the JDBC API, a Java component can retrieve result sets from a database. Using classes in the com.sybase.jaguar.sql package, Java components can also send these result sets to the caller. A Java component can combine the data from several result sets retrieved from databases and send that data as a single result set to a Java client. A Java component can also forward the original result set retrieved from a database.
Java components send results sets with the interfaces in the com.sybase.jaguar.sql package:
Methods in the JServerResultSetMetaData interface define the format of rows in a result set.
Methods in the JServerResultSet interface define column values for rows in a result set and send the rows to the client.
The JContext class contains static factory methods to return objects that implement these interfaces.
Chapter 1, “Java Classes and Interfaces,” in the EAServer API Reference contains reference pages for all classes and interfaces.
You cannot send a result set unless the IDL definition of the component method returns TabularResults::ResultSet or TabularResults::ResultSets. However, you can still use the JServerResultSetMetaData and JServerResultSet interfaces to implicitly return results. Just return null as the method’s return value. Alternatively, you can construct the equivalent Java datatypes for the IDL TabularResults::ResultSet and TabularResults::ResultSets types. Call the getResultSet method in the class com.sybase.CORBA.jdbc11.IDL to convert a java.sql.ResultSet instance into a TabularResults.ResultSet instance that can be returned by the method.