public interface IResultSet extends IRow
The information about the table structure, such as the number, names, and data types of the columns are provided by the IRSMetaData interface.
import quadbase.util.*; ...// other code ////// Print the given result set /////// public void printResultSet(IResultSet rs) throws Exception { IRSMetaData md = rs.getMetaData(); int nCol = md.getColumnCount(); int nRow = 0; // Print the column names and data type constants : for(int i=1; i<=nCol; i++) { System.out.print("\t" + md.getColumnName(i) +"["+ md.getColumnType(i) +"]"); } // Get records : while(rs.next()) { System.out.println(++nRow); for(int i=1; i<=nCol; i++) System.out.print("\t" + rs.getObject(i)); System.out.println(""); } rs.close(); } ...
IRSMetaData
,
StreamResultSet
,
QueryResultSet
,
DbData
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the cursor
|
IRSMetaData |
getMetaData()
Gets the meta data object
|
boolean |
next()
Advances cursor to next row
|
boolean next() throws java.lang.Exception
java.lang.Exception
void close() throws java.lang.Exception
java.lang.Exception
IRSMetaData getMetaData() throws java.lang.Exception
java.lang.Exception