tcurdt 2002/10/02 02:57:09
Modified: src/java/org/apache/cocoon/components/language/markup/xsp
EsqlQuery.java
Log:
reverted the JDBC setMaxRows because it broke rowCount()
Revision Changes Path
1.23 +1 -14
xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/EsqlQuery.java
Index: EsqlQuery.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/EsqlQuery.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- EsqlQuery.java 6 Sep 2002 09:50:37 -0000 1.22
+++ EsqlQuery.java 2 Oct 2002 09:57:09 -0000 1.23
@@ -194,10 +194,6 @@
// Same error with TYPE_SCROLL_SENSITIVE.
preparedStatement = connection.prepareStatement( getQueryString(),
ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
- if (maxRows > -1) {
- // if all JDBC driver's honoured this the code to quit after maxRows
could be removed
- preparedStatement.setMaxRows(skipRows + maxRows +1); // need this to
determine if there's more
- }
break;
case EsqlConnection.LIMIT_METHOD_NOLIMIT:
default:
@@ -205,9 +201,6 @@
// which is not such a good name as its really another way of limiting
using JDBC.
// Produce non-scrollable ResultSet and skip rows with multiple
ResultSet.next().
preparedStatement = connection.prepareStatement(getQueryString() );
- if (maxRows > -1) {
- preparedStatement.setMaxRows(skipRows + maxRows +1); // need this to
determine if there's more
- }
break;
}
statement = preparedStatement;
@@ -223,16 +216,10 @@
break;
case EsqlConnection.LIMIT_METHOD_JDBC:
preparedStatement = connection.prepareCall( getQueryString(),
ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
- if (maxRows > -1) {
- preparedStatement.setMaxRows(skipRows + maxRows +1); // need this to
determine if there's more
- }
break;
case EsqlConnection.LIMIT_METHOD_NOLIMIT:
default:
preparedStatement = connection.prepareCall( getQueryString() );
- if (maxRows > -1) {
- preparedStatement.setMaxRows(skipRows + maxRows +1); // need this to
determine if there's more
- }
};
statement = preparedStatement;
return((CallableStatement)preparedStatement);
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]