jdbc oracle加載驅(qū)動(dòng)類語句怎么寫
1 回答

郎朗坤
TA貢獻(xiàn)1921條經(jīng)驗(yàn) 獲得超9個(gè)贊
Oracle(thin)數(shù)據(jù)庫連接:
1.Class.forName("oracle.jdbc.driver.OracleDriver");
2.DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:[DataBase Name]","scott","tiger");
本機(jī)專用:
con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl","scott","tiger");
Oracle(OCI driver)數(shù)據(jù)庫連接:
1.Class.forName("oracle.jdbc.driver.OracleDriver");
2.DriverManager.getConnection("jdbc:oracle:oci8:@localhost:1521:[DataBase Name]","scott","tiger");
- 1 回答
- 0 關(guān)注
- 724 瀏覽
添加回答
舉報(bào)
0/150
提交
取消