• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

New to jdbc,please help

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I am new to jdbc. I have Orale9.2.0.1 and jdk1.4.0 installed on my Windows XP machine.
I want to install a driver from the following website.
http://otn.oracle.com/software/tech/java/sqlj_jdbc/htdocs/jdbc9201.html
There are 3 files to be downloaded.
ojdbc14.jar
ojdbc14_g.jar
ocrs12.zip.
I have not downloaded them yet.
Am I doing correctly?
Is this a java Thin Driver that I am downloading ?
Is this JDBC2.0 or JDBC3.0 ?How would I know ?
Thanks
Metelda
 
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From the link you provided

all of the following are THIN drivers:
For use with JDK 1.4 (JDBC 3.0 compatible)
ojdbc14.jar - JDBC classes (1,181,679 bytes) - all JDBC 3.0 spec classes - this is generally the one you need
ojdbc14_g.jar - JDBC classes with debug and trace(1,391,860 bytes) - all JDBC 3.0 spec classes and some extra utilities
ocrs12.zip - Additional RowSet support (36,764 bytes) - separate RowSet Implementation - don't need it
For use with JDK 1.2 and JDK 1.3 (JDBC 2.0 compatible)
classes12.zip - JDBC classes (1,213,897 bytes) - all JDBC 2.0 spec classes - this is generally the one you need if you want JDBC 2.0 implementation
classes12_g.zip - JDBC classes with debug and trace (1,451,562 bytes) - all JDBC 2.0 spec classes and some extra utilities
classes12dms.jar - JDBC classes for use with Enterprise Manager (1,208,920 bytes)
classes12dms_g.jar - JDBC classes for use with EM and with debug and trace (1,446,753 bytes)
ocrs12.zip - Additional RowSet support (36,764 bytes)
nls_charset12.zip - Additional National Language character set support (1,813,731 bytes)
The skinny:
at this point all you should need is ojdbc14.jar
Jamie
[ October 30, 2003: Message edited by: Jamie Robertson ]
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
another link you might need is Oracle9i JDBC Developer's Guide and Reference
 
Metelda Ganugapanta
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Jamie
Thanks very much for your reply.
So,all I have to download is "ojdbc14.jar" .
Thanks for the additional link you provided.
Metelda
 
Metelda Ganugapanta
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all
I have followed the above link "Oracle 9i JDBC Developer's Guide and Reference "
I have not downloaded the file "ojdbc14.jar" since it is already in the
"oracle9201\jdbc\lib".
Now I am trying to find out the DriverVersion.
I am compiling this file
import java.sql.*;
import oracle.jdbc.driver .*;
class JDBCVersion
{
public static void main (String args[])
throws SQLException
{
// Load the Oracle JDBC driver
DriverManager.registerDriver
(new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection
("jdbc racle:thin:@localhost:2030:mary","scott","tiger");
// Create Oracle DatabaseMetaData object
DatabaseMetaData meta = conn.getMetaData();
// gets driver info:
System.out.println("JDBC driver version is"+ meta.getDriverVersion());
I am getting an error
package "oracle.jdbc.driver.*;" does not exist.
Also I am not sure about the port number and SID.That was the number I noted down when I downloaded Oracle.
Can anyboby please help me ?
Thanks
Metelda
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Metelda Ganugapanta:

package "oracle.jdbc.driver.*;" does not exist.


Do you have the ojdbc jar file in your classpath?


Also I am not sure about the port number and SID.That was the number I noted down when I downloaded Oracle.


I think the default port number for Oracle is 1521. Of course, your installation may vary.
As for SID, you configure that when you set up the database (should be at the same time you specified a database name).
 
Metelda Ganugapanta
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Joe
Thanks for your help.
I have set the classpath and changed the port number too.
It is working now.
Metelda
 
Enjoy the full beauty of the english language. Embedded in this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic