import java.sql.*;
public class opendb
{
private static opendb db;
private Connection conn;
public static opendb getInstance() throws Exception{
if(db==null){
db = new opendb();
}
return db;
} private opendb() throws Exception{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
this.conn= DriverManager.getConnection("jdbc:odbc:test");
} public Connection getConnection(){
return this.conn;
}
}
public class opendb
{
private static opendb db;
private Connection conn;
public static opendb getInstance() throws Exception{
if(db==null){
db = new opendb();
}
return db;
} private opendb() throws Exception{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
this.conn= DriverManager.getConnection("jdbc:odbc:test");
} public Connection getConnection(){
return this.conn;
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货