server里面连接数据库
public void openDatabase(String dsn) throws SQLException { try { // new sun.jdbc.odbc.JdbcOdbcDriver();
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");} catch (ClassNotFoundException e){System.out.println("Could not find sun.jdbc.odbc.JdbcOdbcDriver");throw new SQLException();}
connection = DriverManager.getConnection("jdbc:odbc:" + dsn, null, null);statement = connection.createStatement();
System.out.println("Connected to " + dsn);}