Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

new to jdbc

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please help me .I'm new to JDBC and want to do some work on it.I have downloaded JDK 1.1.8 .How can I use Access or Oracle as database?How can I get the driver connection.Please tell me some steps by which I can proceed for developing a table from which i can retrive the data .
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
 
anand rk
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Ramesh,
Here r the steps which is smae for any type of data base,but put it in a try catch block b'coz it gives up a xception.This one is for access data base.u first create a dns e in access and give it a name here it is "anand"

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
System.out.println("Driver registered for database...");
Connection con=DriverManager.getConnection"jdbc dbc:anand","username","password ");
System.out.println("Connection established with access...");
stm=con.createStatement();
Bye
Anand
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic