com.sybase.CORBA.jdbc11.IDL class  com.sybase.CORBA.jdbc11.SQL class

Chapter 1: Java Classes and Interfaces



package com.sybase.CORBA.jdbc11;
public class IdlResultSet 
  extends java.lang.Object 
  implements jaguar.sql.JServerResultSet;

Implements the JServerResultSet interface, allowing you to construct TabularResults.ResultSet instances for component methods that return row results.

Component methods that return row results to clients return TabularResults.ResultSet or TabularResults.ResultSet[]. IdlResultSet allows you to create instances of these types using the JDBC style JServerResultSet interfaces.

For documentation of the TabularResults IDL types, see the generated Interface Repository documentation.

To return a single result set, initialize the rows and columns using the JServerResultSetMetaData and JServerResultSet methods, then convert to a TabularResults.ResultSet instance as shown in this code fragment:

JServerResultSetMetaData jsrs;
... define column formats ...
IdlResultSet irs = new IdlResultSet(jsrsmd);
... define row data using JServerResultSet methods ...
return irs.getResultSet();

To return multiple result sets, build an array of TabularResults.ResultSet instances, as follows:

  1. Declare a java.util.Vector instance:

    java.util.Vector vector = new Vector();
  2. Initialize each IdlResultSet instance as described above, then add it to the vector:

  3. When done, convert the vector to an array to be returned by the method:

TabularResults.ResultSet[] array = 
    new TabularResults.ResultSet[vector.size()];
return array;



See also

jaguar.sql.JServerResultSet interface, jaguar.sql.JServerResultSetMetaData interface

Copyright © 2005. Sybase Inc. All rights reserved. com.sybase.CORBA.jdbc11.SQL class