Contents Index Moving through a result set Accessing and manipulating data with the Table API

Native UltraLite for Java User's Guide
  Understanding UltraLite Development
    Accessing and manipulating data with dynamic SQL

Result set schema description


The ResultSet.schema method allows you to retrieve information about a result set, such as column names, total number of columns, column precisions, column scales, column sizes and column SQL types. The following example shows how you can use ResultSet.schema to display schema information in a console window.

for ( int i = 1; 
      i <= MyResultSet.schema.getColumnCount(); 
      i++ ) {
   System.out.println(
      MyResultSet.schema.getColumnName(i) + " " +
      MyResultSet.schema.getColumnSQLType(i)
   );
}

Contents Index Moving through a result set Accessing and manipulating data with the Table API