2010-05-13 85 views
-2
String serverName = "127.0.0.1"; 
String portNumber = "1521"; 
String sid = "database"; 
String url = "jdbc:oracle:thin:@" + serverName + ":" + portNumber + ":" + sid; 
String username = "scott"; 
String password = "tiger"; 
connection = DriverManager.getConnection(url, username, password); 

無法連接到數據庫Oracle連接

+0

而你的問題是...? – soulmerge 2010-05-13 19:07:07

回答

0

假設你的問題是「什麼是不對的圖片」,也許你忽略了包括JDBC JAR類路徑中的驅動程序?