Answered Questions

  • code for connecting java with oracle

    phani

    • Oct 9th, 2006

    first find what kind of driver ur using...if ur using oracle10g (ie type 4 driver)the code isclass.forName("Oracle.jdbc.driver.OracleDriver");connection con=DriverManager.getConncetion("jdbc:oracle:thin:@localhost:1521:xe","scott","tiger");Statement stmt=con.createstatement();

    suhailafroz

    • Sep 2nd, 2006

    we have four different ways in connecting to oracle or any databasecreate a dsn first then use the following statementsClass.forName("sun.jdbc.odbc.JdbcOdbcDriver");Connection con = DriverManager.getConnection("jdbc:odbc:dsnname","username","password");Statement stmt = con.createStatement();