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



Nathan - Below I have pasted a method for my DAO example that shows an
example of a multi-row, multi-column result from a query:

public List retrieveRegistrations(){
List reg_list = null;
reg_list = getSimpleJdbcTemplate().queryForList( "Select * from PERSON" );
return reg_list;
}


If there are 3 records each with 2 columns, then the list returned
will look like:

List{
0 - Map {FIRST_NAME= "Sarah", LAST_NAME="Gladstone"}
1 - Map {FIRST_NAME= "Simone", LAST_NAME="Gladstone"}
2 - Map {FIRST_NAME= "John", LAST_NAME="Doe"}

On Mon, Jul 7, 2008 at 4:48 PM, Nathan Andelin <nandelin@xxxxxxxxx> wrote:
From: Sarah Poger Gladstone
Did you review the sample DAO code I posted to this list?

Yes. And it was helpful. Although the sample appeared to demonstrate a substitute for record level access (chain, update, write) rather than working with multi-row, multi-column result sets. And that could lead to a discussion of the "database layer", if you can call it that.

So far the discussion has pinged and ponged between "presentation layer" and "business object" layer, but we haven't really delved into a "database layer", particularly as it relates to database updates. And the interfaces between these three layers are still a little fuzzy to me in the context of OO languages and runtime environments.

I have no doubt you could write your own DB API for RPG programmers,
but I don't know how you would improve on the JDBC template API.

That's funny. It would be hard to improve on the built in RLA in RPG, and I normally wouldn't make the attempt, using a procedure interface, except if I were attempting to write a runtime utility to access any file on the system through a single interface; like the WRKDBF utility.

Nathan.



--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.