>JdbcRowSet (setTypeMap): Feature not implemented: no details. which occurs on the statement: jrs.execute();
and the next error is:
>SQL Exception when closing database resources >SQL State: XJ012 >Vendor code: 20000 >Message: 'Connection' already closed. which occurs when closing the connection.
I'm assuming that the problems are with Derby since this code runs on the other three databases without incident. Any insights? BTW, I've had not had a problem with a CachedRowSet test on Derby.
Ed ---------------------------------------------------------------------- import java.sql.*; import com.sun.rowset.*; import oi.util.DBUtil;
public class DisplayEmployeesRs
{
private static Connection conn;
private static JdbcRowSetImpl jrs;
private static String query = "select * from employee where salary < ?"; public static void salariesRowSet()
{
try
{
conn = DBUtil.getConnection();
jrs = new JdbcRowSetImpl(conn);
jrs.setCommand(query);
jrs.setInt(1, 20000);
jrs.execute();
while (jrs.next())
{
String first = jrs.getString("firstname");
String last = jrs.getString("lastname");
int salary = jrs.getInt("salary");
System.out.println(first + " " + last + ": " + salary);
}
}
// code omitted here
DBUtil.close(jrs);
DBUtil.close(conn);
}