Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle/JDBC Confusion
Hi Jon,
I get the feeling you are a newbie to java and the db. Before I get
started,
1) Get and use a reference book on JDBC. Look at the API docs from
Javasoft
for JDBC.
2) I'm keeping my fingers crossed for you, for the the fact that I hope
you have
access to a DBA or someone who is handling the db for you...
3) Use the user guide for Visual Cafe, and the Getting Started manual for
Visual Cafe.
Take the time to go through the exercise in the Getting Started manual.
Ok, with all the document recommendations up front, here we go... Look for the in-line coments.
Jon wrote:
> Hello ...
>
> I'm having big problems here. I think I am just too stupid for all of
> this. Grateful if someone would offer some comment on my dilemma.
Don't be too hard on yourself....keep in mind, LEARNING is FUN!
> The Server:
> DOS 6.22, Netware 5, Running Oracle8 for Netware
>
> The Client:
> Win98, connecting to Oracle8 over TCP/IP (not real sure about all
> this listener or tns stuff ... very confusing).
This will be important to you if you get a Connection is refused error.
> The goal is to have an Oracle database running on the server, and and
> to design a Java application that will run on the client side. I am
> using Symantec Visual Cafe Database Edition. It's the only
> development tool I have access to at the moment, but I'm thinking it
> is too complex for me to figure out. Maybe I should consider
> something else.
Well, if you know java, any text editor will do as long as you've
downloaded the
JDK from Sun (JDK if you are doing 1.1.x work else it's now known as the
SDK,
if you are doing java 2 work) but if I'm right on my assumption and you
want to
get an application built, stick with an IDE...it will get you started a
lot faster.
Visual Cafe is well thought of by many java developers. But, if your
heart is set
on trying another, go to the JavaSoft web site, www.javasoft.com, and look
around
for the Swing Connection. They have been comparing IDE's for a while so
it will
give you an idea of what's out there.
> One thing I am very confused about is the JDBC driver. I'm clueless
> which to use, although from reading it seems like JDBC Thin driver JDK
> 1.1 would be the way to go. The documenation is very poor (all of it
> ... Novell, Oracle, Symantec!!). I don't know where to put the
> drivers, or how to use them. I tried ... but cannot get anything to
> work. This file class111.zip, and/or classes111.zip ... is THIS the
> driver????
It sounds like you are developing jdk1.1.x code, so the Oracle
thin driver to use is classes111.zip. The easiest place to put this file
is in
the source directory of your code. Otherwise, you can basically put it
anywhere
you want. In either case, you would use the -classpath option to tell
java to reference
this file. Read chapters3-5 of the Visual Cafe's user's guide for
specific
information on setting the -classpath option when building your project.
> I can work on the database from the client side using SQL*Worksheet.
> But I cannot even get a test program to connect to the database. I
> get messages like "Cannot find the database driver classes," "Cannot
> connect to this database; java.sql.SQLException: No suitable driver."
>
> I tried both the (alleged) driver that came with the Novell CD, and
> downloaded one from Oracle. I put them in a directory on the client
> called Orawin95/jdbc/lib, and included the driver in my classpath. I
> import in the Java code java.sql.* I use
> oracle.jdbc.driver.OracleDrivers as the driver ... the program doesn't
> seem to like this. I use jdbc:oracle:thin:@200.200.200.1:1521:orcl as
> the database URL.
It should like oracle.jdbc.driver.OracleDriver (note singular) and
jdbc.oracle.thin._at_yourdbhostname:1521:orcl. Use the actual host
name of the db host machine, otherwise you will really have to pay
attention to the
listener.ora and the tnsnames.ora files...
Again, this information can be found in a jdbc book. My reference book on
jdbc is
"Database Programming with JDBC and Java" by George Reese, an O'reilly
series book;
ISBN 1-56592-270-0.
Another source of information is always the vendor of your driver, in this
case Oracle.
Go to the Oracle TechNet site and browse around there for information.
> Any help would be appreciated ... I'm about ready to hire someone to
> show me what to do so I can get rolling!
>
> L8r,
> Jon
Best of luck,
Cindy
Received on Sun Aug 15 1999 - 01:53:13 CDT