Topic: java 连接 oracle 问题

  Print this page

1.java 连接 oracle 问题 Copy to clipboard
Posted by: cly_apple
Posted on: 2007-07-31 13:11

private String url="jdbc:oracle:thinAngrylocalhost:1521:MYDATA";
private String driver="oracle.jdbc.driver.OracleDriver";

在 这里 下面 的 是 指 什么??
jdbc:oracle:thinAngrylocalhost:1521:MYDATA

2.Re:java 连接 oracle 问题 [Re: cly_apple] Copy to clipboard
Posted by: junyuo
Posted on: 2007-07-31 13:24

you can go to here, http://www.oreilly.com/catalog/javadata/chapter/ch04.html , to absorb some jdbc-related knowledge.

3.Re:java 连接 oracle 问题 [Re: cly_apple] Copy to clipboard
Posted by: cly_apple
Posted on: 2007-07-31 14:50

谢谢 ,,,可是 我 看不懂 啊..

4.Re:java 连接 oracle 问题 [Re: cly_apple] Copy to clipboard
Posted by: Jacob53
Posted on: 2008-02-13 20:31

这个问题应该查Oracle的JDBC驱动手册,里面有这个连接字串的详细解释。

5.Re:java 连接 oracle 问题 [Re: cly_apple] Copy to clipboard
Posted by: 259372339
Posted on: 2008-02-27 19:56

Class.forName(driver);

Connection conn= DriverManager.getConnection(url,user,password);

6.Re:java 连接 oracle 问题 [Re: cly_apple] Copy to clipboard
Posted by: skwujinhua
Posted on: 2008-10-15 08:45

string oraconnstr = "Data Source = 數據庫;User id =用戶ID; Password = 密碼r;Perisist Security Info = False";
OracleConnection oraconn;
OracleCommand oracmd;

oraconn = new OracleConnection(oraconnstr);
oracmd = new OracleCommadn("",oraconn);
oracmd.CommandType = CommandType.StoredProcedure;
oraconn.OPen();
oracmd.CommandTest="過程名";

7.Re:java 连接 oracle 问题 [Re: cly_apple] Copy to clipboard
Posted by: GavinHunter
Posted on: 2008-10-17 16:30

与数据库连接时候的URL

Connection cnn=DriverManager.getConnection(URL,连接数据库的用户名;连接数据库的密码);
String URL="jdbc:oracle:thinAngry主机IP:端口号:SID ";

其中主机IP一般是装Oracle的机子IP地址,如果是装自己机子上直接就写localhost就OK了;
端口号一般为1521(如果你没改的话)
SID一般为orcl,你的就是MYDATA (你自己改的)

8.Re:java 连接 oracle 问题 [Re: cly_apple] Copy to clipboard
Posted by: 小书虫
Posted on: 2009-03-21 20:56

"jdbc:oracle:thinAngrylocalhost:1521(本机):ora9i(安装ORACLE时候设置) ","scott(数据库用户名)","tiger(数据库密码)"


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923