jdbc oracle加载驱动类语句怎么写
1 回答
郎朗坤
TA贡献1921条经验 获得超9个赞
Oracle(thin)数据库连接:
1.Class.forName("oracle.jdbc.driver.OracleDriver");
2.DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:[DataBase Name]","scott","tiger");
本机专用:
con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl","scott","tiger");
Oracle(OCI driver)数据库连接:
1.Class.forName("oracle.jdbc.driver.OracleDriver");
2.DriverManager.getConnection("jdbc:oracle:oci8:@localhost:1521:[DataBase Name]","scott","tiger");
- 1 回答
- 0 关注
- 689 浏览
添加回答
举报
0/150
提交
取消