You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by Matthew Baird <Ma...@motiva.com> on 2003/02/03 19:21:10 UTC
RE: Scrollable Resultsets in JdbcAccess
this seems to be fixed in the latest CVS
-----Original Message-----
From: lcheng@gmx.net [mailto:lcheng@gmx.net]
Sent: Friday, January 31, 2003 2:45 AM
To: OJB Developers List
Subject: Scrollable Resultsets in JdbcAccess
hi!
is anybody able to answer my question? i posted it some times ago, but
obviously nobody
could react. i think matthew has made the change. could you help me out?
regards,
liang
> hi!
>
> As of OJB 0.9.8 the scrollable flag in method JDBCAccess.executeSQL() has
> been set from
> Query.SCROLLABLE to Query.NOT_SCROLLABLE, which causes RsIterator.size()
> always to
> use count(*) method to determine the size although the JDBC driver
> supports
> it.
>
> public int size() throws PersistenceBrokerException
> {
> int retval = 0; // default size is 0;
> boolean forwardOnly = true;
> try
> {
> # forwardOnly flag yields true forwardOnly =
> m_rsAndStmt.m_stmt.getResultSetType() == ResultSet.TYPE_FORWARD_ONLY;
> }
> catch (SQLException e)
> {
> }
> if (!supportsAdvancedJDBCCursorControl()
> ||
>
PlatformFactory.getPlatformFor(m_cld.getConnectionDescriptor()).useCountForResultsetSize()
> || forwardOnly)
> {
> /**
> * MBAIRD: doesn't support the .last .getRow method, use the .getCount
> on
> the
> * persistenceBroker which executes a count(*) query.
> */
> if (logger.isDebugEnabled()) logger.debug("Executing count(*) to get
> size()");
> retval = countedSize();
> }
> else
> ...
>
> Why has to been changed and how can i force size() not to take the
> count(*)
> method?
>
> thanks,
>
> Liang Cheng
--
+++ GMX - Mail, Messaging & more http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: ojb-dev-help@jakarta.apache.org