HomeОбразованиеRelated VideosMore From: Programming Funday!

A JDBC program to connect Oracle Database..

189 ratings | 42711 views
this is a java JDBC program which gets values from oracle DB table and show it to end user./
Html code for embedding videos on your blog
Text Comments (17)
sirajunnisa sayed (14 days ago)
I had set everything even I am getting an exception that is Java. Lang. ClassNotFoundException:Oracle.jdbc.driver.OraclDriver
Siddhesh Rumade (4 months ago)
Thank you. Insted of "xe" i write my database name then it connct.in my case with "xe" it wont connect to database .
H.M Saiful Islam Saiful (4 months ago)
Sara Poppy (9 months ago)
nice saved my time
Surendra Vishwakarma (10 months ago)
good sir
Saik Sanakousar (11 months ago)
This video really helpful to me.. tnq
kaushik parmar (1 year ago)
excellent sir
Sudha Kar (1 year ago)
abdulmjeed karama (1 year ago)
--------------------Configuration: <Default>-------------------- Exception in thread "main" java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:191) at SelectTest1.main(SelectTest1.java:7) Process completed.
abdulmjeed karama (1 year ago)
can i use both odbc 14 and 6
naval kishor (1 year ago)
If you are using IDE then Right-click on the project -> Properties, then add the JAR (odjbc6 or 14) file in the deployment assembly.
The confused Soul (1 year ago)
can you please explain about setting temporary classpath ?
Brijeshsinh vala (2 years ago)
thanx dude your explanation concept will help me throughout the project explained well ....
bharath kumar (2 years ago)
i have installed both jdk and oracle10g but when i open shortcut file that is on desktop its directing to word processor file and giving some warning what may be the problem
bharath kumar (2 years ago)
then in which problem ie in oracle installation or jdk installation or withn windows 8 os in my syatem
Programming Funday! (2 years ago)
Sometime such problem occurs, I also faced same problem, just go to 'Start --> All Programs --> Oracle Database 10g Express Edition --> Stop Database' //it will stop oracle then go to 'Start --> All Programs --> Oracle Database 10g Express Edition --> Start Database' In my case it solve my problem, Hope it will be helpful to you also. Thanks
Gunjan Jadhav (2 years ago)
import java.sql.*; class cretab { public static void main(String args[])throws Exception { try { Connection con=null; Statement st=null; ResultSet rs=null; int updateQuery=0; Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); st=con.createStatement(); String QueryString="create table EMP(EmpNo int,Empname varchar(20)not null,Salary int,Location varchar(20),constraint pk_Emp primary key (EmpNo))"; updateQuery=st.executeUpdate(QueryString); System.out.println("table is created sucessfully"); QueryString="INSERT INTO EMP values(1,'Ria',50000,'Thane')"; updateQuery=st.executeUpdate(QueryString); QueryString="SELECT* from EMP"; rs=st.executeQuery(QueryString); while(rs.next()) { System.out.println(rs.getInt(1)+" "+rs.getString(2)+" "+rs.getInt(3)+" "+rs.getInt(4)+"\n"); } rs.close(); st.close(); con.close(); } catch(Exception ex) { ex.printStackTrace(); } } } iska ouput kese aayega ?

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.