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



From: MidRange

Hi Joe,

Thanks for responding Joe.

In regard to the code :
while (readCommandA.next())
{
if(some condition dealing with data from row in readCommandA)
{
while (readCommandB.next())
{
updateCommand1.execute();
}
}
}

Is 'readCommandA' a ResultSet? I'm not sure how to relate this to
my situation where the user decides dynamically whether to go
forward or backward and one record set is retrieved at a time. And
due to late breaking changes in the db I don't really want to load
an entire list - and it would be rather large anyway.

To be honest, I don't really recognize the code above. A standard JDBC 2.0
applications looks more like this:

Statement stmt = connection.createStatement(
ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
ResultSet resultSet = stmt.executeQuery("SELECT * FROM myfile");
// Move cursor to the row to update
resultSet.first();
resultSet.updateString("fieldname", "newvalue");
resultSet.updateRow();

Basically, you create an updatable result set and you can iterate through
it, then update each record just like you would with a READ and an UPDATE in
RPG. You can also insert new records, just like a WRITE statement.

Joe



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.