How to connect Oracle with JAVA.will u Plz explain me.
Oracle and Java Connectivity!!!
Collapse
X
-
Check the directoryOriginally posted by rameshrajHow to connect Oracle with JAVA.will u Plz explain me.
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 -
HiOriginally posted by rameshrajHow to connect Oracle with JAVA.will u Plz explain me.
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
Comment