Difference between revisions of "Connecting To AS400 / iSeries"

From PresenceWiki
Jump to: navigation, search
Line 1: Line 1:
com.ibm.as400.access.AS400JDBCDriver
 
 
which can be found in the jt400.jar which is included in the presence install
 
 
 
connection url, eg:-
 
 
jdbc:as400://192.168.65.18;prompt=false;translate binary=true
 
 
 
 
The settings for your SQL Database Resource in Presence should be:-
 
The settings for your SQL Database Resource in Presence should be:-
  
Line 14: Line 4:
  
 
Note, the driver class is:-
 
Note, the driver class is:-
com.microsoft.sqlserver.jdbc.SQLServerDriver
+
com.ibm.as400.access.AS400JDBCDriver
  
This can be found in the sqljdbc.jar (or sqljdbc4.jar for Java version 6 which Presence 3.5.5 uses).
+
Which can be found in the jt400.jar which is included in the presence install
 
+
These jars can in turn be found in the Microsoft SQL Server 2005 driver for JDBC which can be downloaded from:-
+
http://www.microsoft.com/downloads/
+
 
+
Import the jar via Presence - Tools - Jar Manager and then browse to the SQLServerDriver class.
+
  
 
The connection URL takes the form:-
 
The connection URL takes the form:-
jdbc:sqlserver://ServerName:1433:databaseName=MyDatabase;  
+
jdbc:as400://192.168.65.18;prompt=false;translate binary=true
  
Note if you are using Microsoft SQL Server 2000 driver for JDBC then the driver class is
+
prompt=false tells it not to pop up a connection dialog if it can't connect.
com.microsoft.jdbc.sqlserver.SQLServerDriver (i.e. the jdbc and the sqlserver are swapped around)
+
If this is excluded, then each time the connection fails due to authentication a dialog will appear,
 +
which is usually unwanted.
  
 
After hitting test and using the correct username and password you should see the following:-
 
After hitting test and using the correct username and password you should see the following:-
Line 35: Line 21:
 
You can then use the Resource withing Presence in the SQL node.
 
You can then use the Resource withing Presence in the SQL node.
  
http://www.international-presence.com/images/docs/jdbc/sqlresults.png  
+
http://www.international-presence.com/images/docs/jdbc/sqlresults.png
 
+
Presence Version 3.5.4 uses the java 1.5 JVM which in turn will need the sqljdbc.jar
+
 
+
Presence Version 3.5.5 uses the java 1.6 JVM which in turn uses sqljdbc4.jar
+
 
+
As the Presence Jar Manager caches the classes you should restart the server if you have changed the
+
location of a class.
+

Revision as of 18:19, 12 January 2010

The settings for your SQL Database Resource in Presence should be:-

http://www.international-presence.com/images/docs/jdbc/sqlserverdetails.png

Note, the driver class is:- com.ibm.as400.access.AS400JDBCDriver

Which can be found in the jt400.jar which is included in the presence install

The connection URL takes the form:- jdbc:as400://192.168.65.18;prompt=false;translate binary=true

prompt=false tells it not to pop up a connection dialog if it can't connect. If this is excluded, then each time the connection fails due to authentication a dialog will appear, which is usually unwanted.

After hitting test and using the correct username and password you should see the following:-

http://www.international-presence.com/images/docs/jdbc/sqlconnect.png

You can then use the Resource withing Presence in the SQL node.

http://www.international-presence.com/images/docs/jdbc/sqlresults.png