File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes JDBC, Help please Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "JDBC, Help please" Watch "JDBC, Help please" New topic

JDBC, Help please

Ambrose Tati
Ranch Hand

Joined: Oct 03, 2000
Posts: 55
Dear All,
I'm told that to do database access from within my Java programs I don't need a JDBC driver at all. My environment is:
Personal Oracle7, Java1.3, Win98.
Can somebody please help me with a sample code and on how to set up things to get me started?
Thanks in advance
Monty Ireland
Ranch Hand

Joined: Oct 03, 2000
Posts: 161
Who told you that tail... I have hear of stories being told around the camp fire.... but....
I have never heard of this one....
Please correct me if I am wrong..!
I very !
Please review the following code that uses the oracle jdbc driver CLASSES111.ZIP. This file must be in you CLASSPATH.
The following code works with JDK1.3 on NT and Oracle 7.3.4 on unix.
import java.sql.*;

public class CreateCoffees {
public static void main(String args[]) {

String url = "jdbc racle:thin:@S0030947:1521:ispd1";
Connection con;
String createString;
createString = "create table COFFEES " +
"(COF_NAME varchar(32), " +
"SUP_ID int, " +
"PRICE float, " +
"SALES int, " +
"TOTAL int)";
Statement stmt;
try {

catch(java.lang.ClassNotFoundException e) {
System.err.print("ClassNotFoundException: ");
try {
con = DriverManager.getConnection(url, "userid", "password");
stmt = con.createStatement(); stmt.executeUpdate(createString);


} catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
We learn more from our mistake's than from our success's.
[This message has been edited by Monty Ireland (edited October 16, 2000).]

Multi Platform Database Developer & DBA on E.S.T.
Frank Carver

Joined: Jan 07, 1999
Posts: 6920
Just as a note, we've moved over from the old to a newer to access Oracle 7. It has one or two peculiarities, but does seem to fix some serious peoblems which were present in the 111 driver. Good luck trying to find any support for Oracle 7 from Oracle's site, though.

Read about me at ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Monty Ireland
Ranch Hand

Joined: Oct 03, 2000
Posts: 161
Where can I find the new driver....
I been on oracle's technet...
Pls provide URL.

We learn more from our mistake's than from our success's.

Joined: Nov 29, 2000
Posts: 6
Drivers can be found at
I agree. Here's the link:
subject: JDBC, Help please
It's not a secret anymore!