Posted on 2007-12-13 16:05
李鹏辉 阅读(105)
评论(0) 编辑 收藏
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
String url="jdbc:oracle:thin:@localhost:1521:orcl"; //orcl为
数据库的SID
String user="test";
String password="test";
Connection conn= DriverManager.getConnection(url,user,password);