Thread: JDBC iSeries
View Single Post
  #1 (permalink)  
Old 01-21-2008, 09:02 PM
violinssoundcool violinssoundcool is offline
Member
 
Join Date: Jan 2008
Posts: 4
violinssoundcool is on a distinguished road
JDBC iSeries
If I am trying to connect to as AS/400(iSeries) using JDBC in an applet, is this how the code should look to just establish the connection?

Code:
public static java.sql.Connection opnAS400Conn() throws Exception { String url = "domainName"; String userName = "my400UserName"; String password = "my400Password"; String libraryName = "my400LibraryName"; //This should be the library where the datafile resides, right? java.sql.Connection cn = null; Class.forName("com.ibm.as400.access.AS400JDBCDriver"); cn = DriverManager.getConnection("jdbc:as400:" + url + "; translate binary=true; naming=system; " + "extended metadata=true;libraries=" + libraryName + "; date format=iso",userName,password); return cn; }
Reply With Quote
Sponsored Links