I am using oracle 10g, my jdk is 1.4 and my IDE is eclipse and I am trying to connect the oracle data base with the following code, but I am always getting some exception.
I know time is precious.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35241
7
posted
0
What is "some exception"? In which line does it happen?
How are you adding the JDBC driver to the classpath? It apparently isn't part of it.
sachin mesala
Greenhorn
Joined: Jan 09, 2008
Posts: 17
posted
0
Originally posted by Ulf Dittmer: How are you adding the JDBC driver to the classpath? It apparently isn't part of it.
Hi,
i really dont know how to add the JDBC driver to the classpath, can you guide me please.
sachin mesala
Greenhorn
Joined: Jan 09, 2008
Posts: 17
posted
0
Originally posted by Ulf Dittmer: How are you adding the JDBC driver to the classpath? It apparently isn't part of it.
Hi, I gave in the environment variables , in the user variables I gave variable classpath and the value as . ;C:\oracle\ora92\jdbc\lib\classes12.jar.
But i even tried with the �. Classes14.jar
Still same error.
Roger Chung-Wee
Ranch Hand
Joined: Sep 29, 2002
Posts: 1683
posted
0
Are you running this from eclipse? If so, you must add the JAR file containing the driver to the build path.
Right click on the project and select Properties. In the left column select Java Build Path. To the right select the Libraries tab. Click the Add External JARs... button. Search through the file system until you find the JAR file and Click OK.
You may need to rebuild your project to pick up the latest classpath.
SCJP 1.4, SCWCD 1.3, SCBCD 1.3
sachin mesala
Greenhorn
Joined: Jan 09, 2008
Posts: 17
posted
0
Originally posted by Roger Chung-Wee: Are you running this from eclipse? If so, you must add the JAR file containing the driver to the build path.
Right click on the project and select Properties. In the left column select Java Build Path. To the right select the Libraries tab. Click the Add External JARs... button. Search through the file system until you find the JAR file and Click OK.
You may need to rebuild your project to pick up the latest classpath.
Hi,
I did like but i am getting error as
Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor The Connection descriptor used by the client was: localhost:1521:aks
sachin mesala
Greenhorn
Joined: Jan 09, 2008
Posts: 17
posted
0
Originally posted by sachin mesala:
Hi,
yes i am using eclipse and i did the way you said but the error is
Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor The Connection descriptor used by the client was: localhost:1521:aks