Index: com/caucho/quercus/lib/db/JdbcStatementResource.java =================================================================== --- com/caucho/quercus/lib/db/JdbcStatementResource.java (revision 6252) +++ com/caucho/quercus/lib/db/JdbcStatementResource.java (working copy) @@ -534,10 +534,12 @@ _stmt = conn.prepareCall(_query, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); - } else { + } else if (_conn.canSeek()) { _stmt = conn.prepareStatement(_query, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + } else { + _stmt = conn.prepareStatement(_query); } return true; @@ -573,10 +575,12 @@ _stmt = conn.prepareCall(query, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); - } else { + } else if (_conn.canSeek()) { _stmt = conn.prepareStatement(query, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); + } else { + _stmt = conn.prepareStatement(query); } return true; Index: com/caucho/quercus/lib/db/JdbcConnectionResource.java =================================================================== --- com/caucho/quercus/lib/db/JdbcConnectionResource.java (revision 6252) +++ com/caucho/quercus/lib/db/JdbcConnectionResource.java (working copy) @@ -625,8 +625,7 @@ // php/142v if (true || stmt == null) { // XXX: test for performance - boolean canSeek = true; - if (canSeek) + if (canSeek()) stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); else @@ -1196,5 +1195,14 @@ return tok; } } + + /** + * Identifies if the JDBC driver supports TYPE_SCROLL_INSENSITIVE. + * @return True is scroll insensitive supported, false otherwise. + */ + boolean canSeek() + { + return true; + } }