package com.tutego.insel.jdbc;

import java.sql.SQLException;

import javax.sql.rowset.CachedRowSet;

import com.sun.rowset.CachedRowSetImpl;

public class CachedRowSetDemo
{
  public static void main( String[] args ) throws SQLException
  {
    CachedRowSet crset = new CachedRowSetImpl();
    crset.setDataSourceName( "TutegoDS" );
    crset.setCommand( "SELECT * FROM Customer" );
    crset.execute();

    while ( crset.next() )
      System.out.println( crset.getString(1) );

    crset.close();
  }
}
