Use either of them
DriverManager - Class in java.sql package DataSource - Interface in javax.sql package Both of them have a method called getConnection(). DriverManager has it as a static method whereas DataSource's is an instance method. getConnection() gives you a java.sql.Connection object.
Also make sure of the
JDBC Driver Type as well. Depends on that you need to pass the Connection URL.
You can go through these links
JDBC Tutorial from Sun JDBC articles in Sun HtH.
[ May 23, 2007: Message edited by: Raghavan Muthu ]