aspose file tools*
The moose likes JDBC and the fly likes JDBC-ODBC with Oracle Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC-ODBC with Oracle" Watch "JDBC-ODBC with Oracle" New topic
Author

JDBC-ODBC with Oracle

Vishakha Ahuja
Ranch Hand

Joined: Sep 13, 2000
Posts: 191
Hi,
Can I use JDBC-ODBC bridge with Oracle 8i database ? How do I know if it is already present on my Windows 98 computer or I've to install it ?
When I try to set USER DSN in the Control Panel, I see 3 Drivers:
1)Microsoft ODBC Driver for Oracle
2)Microsoft ODBC for Oracle
3)Oracle ODBC Driver
Which of these should I use ?
Is there any other setting I need to do before I can run my JDBC program ?
Regards,
Vishakha
Col Bell
Greenhorn

Joined: Mar 21, 2002
Posts: 12
If you've installed Java 1.2 or higher on the PC then you have the JDBC/ODBC bridge.
As for which ODBC driver you should use I would suggest that you try them all and see which one works for you. I've had success with the Oracle ODBC driver.
Is there any reason that you don't want to use the type 4 (pure Java) driver supplied with Oracle?
Col


Col<br /><a href="http://www.squirrelsql.org" target="_blank" rel="nofollow">http://www.squirrelsql.org</a>
Vishakha Ahuja
Ranch Hand

Joined: Sep 13, 2000
Posts: 191
Thanks col. I'm not sure how to use type 4. The book I'm referring to uses JDBC-ODBC with MS Access, so I thought of trying with Oracle also.
I'll try type 4 if i knew how to connect ?
Col Bell
Greenhorn

Joined: Mar 21, 2002
Posts: 12
The readme that comes with it is terse but does explain whats needed.
You can get the latest drivers from here
Basically you need to put the classes12.zip file in your classpath.
The driver name you need is "oracle.jdbc.driver.OracleDriver".
The URL will be of the form jdbc racle:thin:@<server>:<port>:<database_name>
where you need to replace <server> with the name of the Oracle server, <port> with the port number of the listener (usually 1521) and <database_name> is the SID of the database.
Col
Col Bell
Greenhorn

Joined: Mar 21, 2002
Posts: 12
That should have been "the URL will be of the form"
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDBC-ODBC with Oracle
 
Similar Threads
JDBC Connectivity
connection url
getBlob() gives exception
Connecting Java Application with a Database
Jdbc