If you create the connection as a AS400JDBCConnection, instead of java.sql.Connection, then you could do AS400 as400 = connection.getSystem();
Something like this should work
       AS400JDBCConnection conn = ( AS400JDBCConnection ) conn400;
       AS400 system = conn.getSystem();

Where conn = DriverManager.getConnection("jdbc:as400://systemname")


Ewout N Boter wrote:
In our shop, we are doing some experiments with Java. We access the iSeries database with JDBC. When our pilot application is started, a JDBC-connection is established with the statement "connection = DriverManager.getConnection("jdbc:as400://systemname")". A pop-up window is displayed, allowing the user to log on. So far, so good. Now, in the application, we have to call an RPG service program. We plan to use the class ServiceProgramCall from the AS/400 Toolbox for Java. The methods of this class require an instantiation of the class AS400. Of course, we don't want the user to have to log on two times, once for creating the JDBC-connection, and once for creating the AS400-connection. Is it possible to create the AS400-connection 'in the background', making use of the fact that a JDBC-connection has already been established?


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