URL string format for connecting to Oracle database with JDBC

前端 未结 7 1461
予麋鹿
予麋鹿 2020-12-02 09:44

I\'m a newbie to Java-related web development, and I can\'t seem to get a simple program with JDBC working. I\'m using off-the-shelf Oracle 10g XE and the Eclipse EE IDE. Fr

7条回答
  •  一整个雨季
    2020-12-02 10:28

    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());         
    connection = DriverManager.getConnection("jdbc:oracle:thin:@machinename:portnum:schemaname","userid","password");
    

提交回复
热议问题