jdbc help?

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: May 2005
Posts: 82
Reputation: indianscorpion2 is an unknown quantity at this point 
Solved Threads: 1
indianscorpion2 indianscorpion2 is offline Offline
Junior Poster in Training

jdbc help?

 
0
  #1
Jan 27th, 2006
hi everyone,
i am looking for a brief introduction as to what exactly is jdbc and how do i install and use jdbc drivers with oracle 9i. and how shoud i write a code to execute queries on the tables in my oracle 9i database.
Reply With Quote Quick reply to this message  
Join Date: Jan 2006
Posts: 11
Reputation: fisheye is an unknown quantity at this point 
Solved Threads: 0
fisheye's Avatar
fisheye fisheye is offline Offline
Newbie Poster

Re: jdbc help?

 
0
  #2
Jan 27th, 2006
Originally Posted by indianscorpion2
hi everyone,
i am looking for a brief introduction as to what exactly is jdbc and how do i install and use jdbc drivers with oracle 9i. and how shoud i write a code to execute queries on the tables in my oracle 9i database.
It all depends on your Java environment. Wherever your Java code executes, it needs access to the Oracle JDBC class files. This means that the class files must reside in the classpath of your application. If you are running a Java web application in a Java Application Server such as WebSphere or Tomcat, you will typically place class files in the /WEB-INF/lib folder of your application.

Please refer to Google.
Reply With Quote Quick reply to this message  
Join Date: Jan 2006
Posts: 2
Reputation: ramamoorthy is an unknown quantity at this point 
Solved Threads: 0
ramamoorthy ramamoorthy is offline Offline
Newbie Poster

Re: jdbc help?

 
0
  #3
Jan 28th, 2006
JDBC acts like bridge between your front-end (may be web-application,jsp,vb,form etc.,)and back-end(database). JDBC will talk to you db.

Choose appropriate jdbc drivers for Oracle9i. Ensure that jdbc drivers available in your machine through Settings/ControlPanel in Windows.

The simple code fragments:
Class.forName("sun.jdbc.odbc.JdbcOdbc");
Connection conn=DriverManager.getConnection(dsn,"username",pwd");
Statement st = conn.createStatement();
ResultSet rs = st.executeQuery("select * from x");

while(rs.next()){
System.out.println(rs.getString(1));


}
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum
Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC