× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



A1. Search in oracle installation for a jar file like ojdbc14.jar which contains the thin jdbc driver. A2. Yes. Java runs anywhere. A3. See code below

Regards
Bruce

public static void main(String args[]) {

           Connection conn = null;

            try {

                       Class.forName("oracle.jdbc.driver.OracleDriver");

                       System.out.println("Driver loaded.");

String sys = "jdbc:oracle:thin:@mrcwin:1521:testdb"; conn = DriverManager.getConnection(sys, "jin", "jin");

System.out.println("Connecting to: " + sys); Statement stmt = conn.createStatement();
                       String sql = "SELECT COUNT(*) FROM HR.countries";

ResultSet rs = stmt.executeQuery(sql); String s = "";
                       while (rs.next()) {

                       }

                        stmt.close();

conn.close();
                       } catch (ClassNotFoundException exc) {

                                   System.out.println("Error: " + exc);

                                   exc.printStackTrace();

} catch (SQLException exc) {
                       }

} //main


Ashish Kulkarni wrote:

Hello

We have a project in which we need to get some data
from Oracle database, we are planning to use java and
JDBC to connect to oracle to get this data.
Q1 Where can i find the JDBC driver for oracle,
Q2 Has anyone tested trying to get data from oracle
database with a java program running on AS400.
Q3 Does anyone have a sample java program to create
connectio to oracle database


Ashish


                
____________________________________________________
Sell on Yahoo! Auctions - no fees. Bid on great items. http://auctions.yahoo.com/

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.