× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Joe,
 
Thanks for your response, I haven't had a chance to try your
recommendations, but hopefully will tomorrow.  I figured out a
workaround, but would like to figure out why it's not allowing me to
reposition.  Your tip of checking the methods should help!
 
Instead of the following: 
> I can process the result set once, but any attempt to reposition the
> cursor yields null values.

I should have said any attempt to reposition the result set yields a
boolean value of false.  So basically it's telling me that I can't
reposition the result set.
 


>>> jshirah@xxxxxxxxxxxxx 4/19/2006 4:08:41 AM >>>


    Hi Nancy,

    I tend to stay away from stored procedures, although you wouldn't
know
it at the moment; I'm currently involved in converting several hundred
SQL
Server SP's to DB2.

    I would expect your code to work.  The primary thing that ocurred
to me
is that holdability may be ResultSet.CLOSE_CURSORS_AT_COMMIT.  That
still
may be the issue.  If so, use

Connection.prepareCall(String sql, int resultSetType, int
resultSetConcurrency, int resultSetHoldability)

    You can check your ResultSet with the ResultSet methods
getConcurrency()
and getType(), and the Statement methods  getResultSetConcurrency(),
getResultSetHoldability() and  getResultSetType().

    But this:

> I can process the result set once, but any attempt to reposition the
> cursor yields null values.

doesn't make sense to me, unless the program is resetting the variables
to
null beforehand.  Do you get any warnings or exceptions?  What is the
boolean return of your positioning call?


                                                         Joe Sam

Joe Sam Shirah -        http://www.conceptgo.com
conceptGO       -        Consulting/Development/Outsourcing
Java Filter Forum:       http://www.ibm.com/developerworks/java/
Just the JDBC FAQs: http://www.jguru.com/faq/JDBC
Going International?    http://www.jguru.com/faq/I18N
Que Java400?            http://www.jguru.com/faq/Java400


----- Original Message ----- 
From: "Nancy Cochran" <ncochran@xxxxxxx>
To: <java400-l@xxxxxxxxxxxx>
Sent: Monday, April 17, 2006 2:10 PM
Subject: scrollable result sets


> Does the ibm toolbox support scrollable result sets returned from
> callablestatements?  I can't get it to work, but the documentation
says
> it should.
> Code is basically...
>
> private CallableStatement stmt = null;
> String sql = "{Call program (?,?)}";
> stmt =
>
conn.prepareCall(sql,ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATA
BLE);
> stmt.execute();
> rs = stmt.getResultSet();
>
> I can process the result set once, but any attempt to reposition the
> cursor yields null values.
>
> Thanks in advance.
> -- 


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.