•import java.sql.*;
•Class FirstTry{
• public
static void main(String[] args){
• try{
• String
url=“jdbc:odbc:myDSN”;
• /*load the driver from Sun*/
•
Class.forName(“sun.jdbc.odbc.JdbcOdbcDriver”);
• //get a connection
• Connection
con=DriverManager.getConnection(url,”userID”,”password”);
• }catch(Exception
E){System.err.println(E.getMessage());}