Link to home
Start Free TrialLog in
Avatar of LeanMoreTryMore
LeanMoreTryMore

asked on

Don't know how to connect to Oracle database

First time to build the JSP page using DreamWeaver

When I try to add a record set and define the Oracle database connection. I have entered the info

URL:jdbc:oracle:thin:137.152.40.84:1521:dev

with its Oracle login user and its password

BUT when i click on the Test button for testing database connection

I got the following error message.

oracle/jdbc/driver/oracleDrive

Would anyone give me some hints so I can connect the database, thanks?

Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Try install Oracle Client on that machine 1st?

And what i usually did to connect my Oracle database via JSP is via a ConnectionPool Class, here is a good one:

http://www.javaexchange.com/

try look and download for DbConnectionBroker

regards
Avatar of LeanMoreTryMore
LeanMoreTryMore

ASKER

i have already installed the Oracle client on my machine.
Hi ryancys,

I have just downloaded the DBConnectionBroker.class
What I need to do next, please advise
Have you saw the examples available in that DbConnectionBroker1.0.13.tar you downloaded?

For your info, the DBConnectionBroker.class is the compiled java file, you may need to decompile it if you want to see what's the codes written inside, and amend it accordingly.

For Java Decompiler, you can try:
http://members.fortunecity.com/neshkov/dj.html

hmm... a bit complicated? hope this is not confusing you... :/

regards
My initial question is how do i connect the database via DreamWeaver.
The example is the java program to connect database. I know what to do.
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
1.  Do you mean jdbc:oracle:thin:137.152.40.84:1521:dev? (coz if it is typo error, then ignore it)
otherwise it should look like this  jdbc:oracle:thin:@137.152.40.84:1521:dev (you are missing @ symbol in your url)

2.  Regarding the 2nd error, classes12.zip / classes12.jar is not in your classpath.  Either include classes12.zip/classes12.jar in your classpath or include that in /WEB-INF/lib folder.

Hope this helps!!
Forgot to mention:  Class OracleDriver is included in classes12.zip file under the package oracle/jdbc/driver
Hi, maybe I'm wrong, but I think if you wanna to connect to oracle, you must have a valid entry for target machine in tnsnames.ora
I hope I'm not out of topic - I connected to oracle database from windows machine, from C#.
     Pepa
Hi, be aware that not all web containers automatically load .zip files from /WEB-INF/lib. You might have better luck if you rename the classes12.zip to classes12.jar.

check you driver classname , it should be oracle.jdbc.driver.OracleDriver . By the looks of thing you've got it set to oracle.jdbc.driver.oracleDrive.

regarding tnsnames entry / oracle client , these are not required for the thin driver.

hth,
Edwin.
LeanMoreTryMore,
Hi!  I did define an Oracle database connection in Dreamweaver MX 2004 and got it to work.  I am new to Dreamweaver also.   Anyway you probably know all this already, but here is what I did for an Oracle Thin Driver connection:
Connection Name:  as03
Driver:  oracle.jdbc.driver.OracleDriver
URL:  jdbc:oracle:thin:@<IP address of server>:1521:<sid_name>
User Name:  <some user name on db>
Password:    <password>
selected  Using Driver On This Machine and then clicked Advanced button and entered a schema in Caps in the Schema input field.  
Clicked on Test.  It said that it was successful.   Clicked on the plus sign beside the connection name in the Databases tab and then clicked on the plus beside tables.  The list of tables appeared from that schema.  
I figured out the connection but do not understand how to get the jsp file to run in Dreamweaver.  I do have the Oracle 9i database software installed on my computer, not just the client.  But I would think the client should work.   Maybe you got this resolved by now?  Hope so!

perrycn