public void addColumn(String name,int sqlType,String sqlTypeName,int precision,int scale){
  if (rows != null && rows.size() > 0) {
    throw new IllegalStateException("Cannot add a column after adding rows");
  }
  if (name == null) {
    name="C" + (columns.size() + 1);
  }
  Column column=new Column();
  column.name=name;
  column.sqlType=sqlType;
  column.precision=precision;
  column.scale=scale;
  column.sqlTypeName=sqlTypeName;
  columns.add(column);
}

public void addColumn ( String name , int sqlType , String sqlTypeName , int precision , int scale ) { if ( rows != null && rows . size ( ) > 0 ) { throw new IllegalStateException ( "Cannot add a column after adding rows" ) ; } if ( name == null ) { name = "C" + ( columns . size ( ) + 1 ) ; } Column column = new Column ( ) ; column . name = name ; column . sqlType = sqlType ; column . precision = precision ; column . scale = scale ; column . sqlTypeName = sqlTypeName ; columns . add ( column ) ; }
adds a column to the result set . all columns must be added before adding rows .
