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.

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.

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));


}

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.