Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Interfaces Jdbc > scrollable Resu...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 1952 of 1987
Post > Topic >>

scrollable ResultSet advise

by achill@[EMAIL PROTECTED] (Achilleas Mantzios) May 12, 2008 at 11:47 AM

Hi, i am just migrating from 7.4 to 8.3, and i have this issue:
In the old 7.4 days i wrote a simple function to get the size of a
ResultSet.
public static int FS(ResultSet rs) throws SQLException{	/* fetch size */
		rs.last();
		int cnt = rs.getRow();
		rs.beforeFirst();
		return cnt;
}

However, in plain connnection.prepareStatement(String sql) calls,
ResultSet type defaults to FORWARD_ONLY,
making the above code broken.

I am wandering if there is a quick way to solve this problem, without
touching the huge number of PreparedStatements
in the code.
Has anyone solved this problem using some kind of a wrapper, e.g. using
wrapper classes from jboss?
-- 
Achilleas Mantzios

-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
 




 3 Posts in Topic:
scrollable ResultSet advise
achill@[EMAIL PROTECTED]   2008-05-12 11:47:13 
Re: scrollable ResultSet advise
books@[EMAIL PROTECTED]   2008-05-15 02:14:52 
Re: scrollable ResultSet advise
achill@[EMAIL PROTECTED]   2008-05-15 09:44:54 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Tue Jul 8 23:40:52 CDT 2008.