Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC-ODBC with Oracle

 
Vishakha Ahuja
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Vishakha Ahuja
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That should have been "the URL will be of the form"
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic