You will need jt400.jar in your classpath and something along the lines of
String driver = "com.ibm.as400.access.AS400JDBCDriver";
DriverManager.registerDriver((Driver) Class.forName(driver)
.newInstance());
String url = "jdbc:as400://" + bean.getHostname();
final Connection connection;
connection = DriverManager.getConnection(url,
bean.getUsername(),
bean.getPassword());
in your code to get the initial connection object. (Note that for JDBC 4
another jar is needed).
/Thorbjørn
-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx]
On Behalf Of David Gibbs
Sent: 25. januar 2013 19:36
To: Java Programming on and around the IBM i
Subject: Re: Anybody know a good JDBC tutorial, (was Re: Uniquely
identifying a record in SQL without a unique key? on Midrange list)
On 1/25/2013 12:25 PM, James H. H. Lampert wrote:
Anybody know of a JDBC tutorial that actually works, preferably by a
non-anonymous author or authors?
I used
http://docs.oracle.com/javase/tutorial/jdbc/ to learn JDBC (mostly).
It's no i specific, but JDBC isn't really supposed to be.
david
--
IBM i on Power Systems - For when you can't afford to be out of business
I'm riding 100km (62 miles) in the 2013 Chicago Area Tour de Cure to raise
money for Diabetes research and education! Sponsor me by visiting
http://archive.ridewithdavid.com. Thanks!
--
This is the Java Programming on and around the IBM i (JAVA400-L) mailing
list To post a message email: JAVA400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at
http://archive.midrange.com/java400-l.
As an Amazon Associate we earn from qualifying purchases.