开发者

How do i get a connection from Oracle SQl server

I am new to Oracle SQL Developer.

What are the connection statements for Oracle Sql Developer.

My application is a struts based application, With a simple login and register page. I want to store the data in to the DB when i register and when i login i want to check wether the user is registered or not.

try {
      DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
      co开发者_C百科n=DriverManager.getConnection("????","user","password");
    }
catch (Exception e){
      System.out.println(e);
    }

I guess these are the connection statements. What should be in the place of ????

Lemme know if am wrong.


It needs to be the JDBC connection URL pointing to your database.

jdbc:oracle:[driver_type]:@[server_name]:[port]:[database_name]

Replace the parts in brackets with their values, for example:

jdbc:oracle:thin:@localhost:1521:your_db

http://www.jguru.com/faq/view.jsp?EID=444466

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜