JDBC连接oracle的端口?

reborn 2001-07-02 10:59:40
我用jdbc连接oracle怎么连,其中oracle的端口怎么得到,本地机调试
...全文
80 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
kuqi 2001-07-02
  • 打赏
  • 举报
回复
1521
nintyuui 2001-07-02
  • 打赏
  • 举报
回复
String user = req.getParameter("user");
String password = req.getParameter("passwd");
String url_address = req.getParameter("url");
//The name of the JDBC driver to use
String driverName="oracle.jdbc.driver.OracleDriver";
//The JDBC Connection url
String connectionURL="jdbc:oracle:thin:@" + url_address;
//The JDBC Connection Object
Connection conn = null;
try
{
//create an instance of the JDBC driver so that it has a chance to register itself
Driver driver = (Driver)Class.forName(driverName).newInstance();
//create a new database connection.
conn = DriverManager.getConnection(connectionURL, user, password);

2,596

社区成员

发帖
与我相关
我的任务
社区描述
Sybase相关技术讨论区
社区管理员
  • Sybase社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧