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


  • Subject: Re: [SQL7008] URLGROUP in TEFF not valid for operation.
  • From: "Joe Teff" <joeteff@xxxxxxxxxxxxx>
  • Date: Sat, 29 Apr 2000 11:06:24 -0500

I believe I found my answer in a message posted earlier on java400-L.
----------------------------------------------------------------------------
----------------------
There is an example (and full javadoc) in the AS/400 Toolbox for Java
Programmer's Guide (which is available for download from
http://www.ibm.com/as400/toolbox).  By default, ResultSets are read only -
- as dictated by the JDBC specification.  In order to make a ResultSet
updatable, there are really 2 extra steps you have to take:

1.  When you create the Statement, PreparedStatement, or CallableStatement,
you have to specify a result set conncurency of CONCUR_UPDATABLE.  This is
business as usual for JDBC:

    Statement s = c.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
                                     ResultSet.CONCUR_UPDATABLE);


2.  When the AS/400 database opens a cursor (on behalf of a ResultSet), it
does so as either read-only or updateable.  When you execute your query,
you have to tell it to open the cursor as updateable by using the FOR
UPDATE clause:

     ResultSet rs = s.executeQuery ("SELECT NAME,ID FROM MYLIBRARY.MYTABLE
FOR UPDATE");


The ResultSet will be updateable.  Hope that helps,
- Clif
_______________________________________
Clifton M. Nock (cnock@us.ibm.com)
AS/400 Toolbox for Java

+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---

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.