resultset.setFetchSize() Exception : invalid Fetch Size .... :-(
843854Aug 4 2003 — edited Aug 5 2003dear all, I have "Invalid Fetch Size" exception when execute the following statements :
try {
int count = 0;
rs.setFetchSize(100);
while (rs.next()) {
System.out.println("Rows: " + (++count));
}
}catch (java.sql.SQLException e) {
System.out.println("java.sql.SQLException : " +e.toString());
}
I using Oracle and try to retrieve a huge data from a table. It tooks long time in the while loops and sometime hits the "out of memory" error. That is why i try to use fetch method. Do I need to do setFetchDirection()?? or do i need to do setFetchSize() on the statement? what is different doing setFetchSize() at statement and resultset??
Thanks in Advance.
From
CBLC