× 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.



All,

Before one of you says it, I know...the drive is not a long one :)

I am having a problem when trying to update a file.  I create a prepared
statement with ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE.
I then read the file and get a result back.  I checked the cursor position
and saw that the cursor is sitting on row #1.  I make my changes to the
values in the wrapper class.  After the changes are made, I am going to
update all the resultset fields.  First, I check the row the cursor is on.
It is still on row #1.  I then try to update the resultset with the new
values.  Every time I try this, I get an error.  The error is:

Cursor state not valid.
SQLError code: -99999
SQLError state: 24000
Stack Trace:
java.sql.SQLException: Cursor state not valid.
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:296)
at
com.ibm.as400.access.AS400JDBCResultSet.beforeUpdate(AS400JDBCResultSet.java
:2954)
at
com.ibm.as400.access.AS400JDBCResultSet.updateValue(AS400JDBCResultSet.java:
4487)
at
com.ibm.as400.access.AS400JDBCResultSet.updateBigDecimal(AS400JDBCResultSet.
java:3310)
at dataaccess.JDBCFileAccess.update(JDBCFileAccess.java:223)
at dataaccess.JDBCFileAccess.main(JDBCFileAccess.java:548)

I tried everything I could possible think of..... leaving the cursor where
it sits, moving the cursor back, forward, to current row.... Nothing works!
I get the same error every time...the stack dump is the same each time too.

Any ideas???

Thanks!

Mike

================================
Mike Silvers
AS/400 Senior Programmer/Analyst
AS/400 IBM Certified RPG IV Developer
AS/400 IBM Certified Solutions Expert
Hainey Business Systems
8 E. Canal St
Dover, PA 17315
Branch Office:  (410) 397-8739
Phone:  (800) 932-3380 ext. 237
Fax:  (717) 292-9474
Web: http://www.hbs-inc.com
________________________________
Providing E-Commerce, EDI, AS/400
Development, Java Development,
and related services nationwide.
================================




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.