Sending result sets with Java

Java components send results sets with the interfaces in the com.sybase.jaguar.sql package:

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.

NoteYou cannot send a result set unless the IDL definition of the component method returns TabularResults::ResultSet or TabularResults::ResultSets.

Methods in Java components that use Java/IDL datatypes must be declared to return TabularResults.ResultSet or TabularResults.ResultSet if the method returns result sets. 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.