开发者

oracle connectivity

String serverName = "127.0.0.1";
String portNumber = "1521";
String sid = "database";
String url开发者_如何学C = "jdbc:oracle:thin:@" + serverName + ":" + portNumber + ":" + sid;
String username = "scott";
String password = "tiger";
connection = DriverManager.getConnection(url, username, password);

Could not connect to the database


The mother of all connection string sites: http://www.connectionstrings.com/oracle


Assuming your question is "what's wrong with this picture", perhaps you overlooked including the JDBC JAR Driver in the classpath?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜