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 oracle.sql.* and oracle.jdbc.driver.* Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Reply locked New topic

oracle.sql.* and oracle.jdbc.driver.*

Jyothsna Sri Y
Ranch Hand

Joined: Sep 25, 2003
Posts: 35
Hi Everyone
I have the following two statements in my code,
import oracle.jdbc.driver.*;
import oracle.sql.*;
When i try to compile the code it gives me the following error messages, package oracle.jdbc.driver does no
import oracle.jdbc.driver.*;
^ package oracle.sql does not exist
import oracle.sql.*;
Can somebody tell me how to solve this problem..
this is very very urgent...
Thank You
[ November 25, 2003: Message edited by: Bear Bibeault ]
Joe Ess

Joined: Oct 29, 2001
Posts: 9189

In the Oracle Java Developer's Guide, it says you must include the file in your classpath.

[How To Ask Questions On JavaRanch]
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

from the oracle JDBC docs:
"Your code should use the package oracle.jdbc instead of the package oracle.jdbc.driver used in earlier versions of Oracle. Use of the package oracle.jdbc.driver is now deprecated, but will continue to be supported for backwards compatibility."
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

never mind my post, its not the problem ( the whole backwards compatiblility part! ). Anyways, which driver are you using ( in your classpath ) ? If you are using the or higher thin driver, then your code should work fine unless you've got a classpath problem as stated above.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63858

Closed on author's request.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: oracle.sql.* and oracle.jdbc.driver.*
It's not a secret anymore!