import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.Properties;

public class TimestampTest
{

    public static void main (String[] argv)
        throws Exception
    {
        //SQL: create table test1 (id varchar(10));
        com.mysql.jdbc.Driver driver = new com.mysql.jdbc.Driver ();
        Connection conn = null;
        Statement stmt = null;
        ResultSet rs = null;
        try
        {
            conn = driver.connect (
                "jdbc:mysql://main/poftest?user=poftest&password=poftest",
                new Properties ());
            stmt = conn.createStatement ();
            rs = stmt.executeQuery ("select * from test1 where id='invalid'");
            rs.getTimestamp (1);
        }
        finally
        {
            if (rs != null) rs.close ();
            if (stmt != null) stmt.close ();
            if (conn != null) conn.close ();
        }
    }

}
