Java examples for java.sql:ODBC
get Connection jdbc:odbc Bridge
//package com.java2s; import java.sql.Connection; import java.sql.DriverManager; public class Main { public static void main(String[] argv) throws Exception { System.out.println(getConnection()); }/*from www.ja va 2 s . c om*/ public static Connection getConnection() { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con = DriverManager .getConnection("jdbc:odbc:MusicOnlineStore"); return con; } catch (Exception ex) { return null; } } }