Oracle and Java Connectivity!!!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rameshraj
    New Member
    • Jul 2007
    • 4

    #1

    Oracle and Java Connectivity!!!

    How to connect Oracle with JAVA.will u Plz explain me.
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by rameshraj
    How to connect Oracle with JAVA.will u Plz explain me.
    Check the directory
    oraclexe\app\or acle\product\10 .2.0\server\jdb c\lib
    or something like it and see if you have any of the following zip files
    ojdbc14
    or
    ojdbc14_g
    If you don't have them, then go the oracle site and download them (You just need one of them).
    Once you have them, add their path to your classpath and then connect to the database using jdbc

    Comment

    • praveen2gupta
      New Member
      • May 2007
      • 200

      #3
      Originally posted by rameshraj
      How to connect Oracle with JAVA.will u Plz explain me.
      Hi

      There are many ways to connect to database. For begainers you should use the Class.forName(" sun.jdbc.odbc.J dbcOdbcDriver") ; driver.

      Now go to control panel open odbc, create a sytem DSN, new write a name Learning and select the oracle driver.

      after that use the Connection class
      String url = "jdbc:odbc:Lear ning";//Learning is DSN Name
      java.sql.Connec tion c = DriverManager.g etConnection(ur l,"Learning", "Learning") ;

      For details read following article
      http://www.javacoffeeb reak.com/articles/jdbc/

      Comment

      Working...