This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes what kind JDBC driver do I need ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "what kind JDBC driver do I need ?" Watch "what kind JDBC driver do I need ?" New topic
Author

what kind JDBC driver do I need ?

Steve Yu
Ranch Hand

Joined: Mar 26, 2003
Posts: 60
If my java code runs on windows 2000, from there it needs to
access a Oracle or Sybase database on a Solaris Unix box,
then in the JDBC part of my java code, should I
use a Oracle or Sybase's driver for windows 2000 or for
Solaris ?
Wayne L Johnson
Ranch Hand

Joined: Sep 03, 2003
Posts: 399
If you use a Type 4 driver (such as Oracle's THIN driver or Sybase's jconn2) then you can talk to any database regardless of what platform you are running on and what platform the database is on.
Likewise, if you are using the JDBC-ODBC bridge, then as long as you have an ODBC connection defined you can acess the database, regardless of what platform it is on.
In other words, there is only one version of these drivers--they are platform independent.
Steve Yu
Ranch Hand

Joined: Mar 26, 2003
Posts: 60
Originally posted by Wayne L Johnson:
If you use a Type 4 driver (such as Oracle's THIN driver or Sybase's jconn2) then you can talk to any database regardless of what platform you are running on and what platform the database is on.
Likewise, if you are using the JDBC-ODBC bridge, then as long as you have an ODBC connection defined you can acess the database, regardless of what platform it is on.
In other words, there is only one version of these drivers--they are platform independent.


Thanks. If I access the databse from the same Solaris box, then
certainly I should install the JDBC driver on the Solaris box;
Now, since I access it from windows OS, should I install the driver
on windows or Solaris ?
Wayne L Johnson
Ranch Hand

Joined: Sep 03, 2003
Posts: 399
The drivers (JAR files) only need to be accessible on the machine you are running on, in this case Windows. Just make sure they're in your classpath. The files do NOT need to reside on the database servers (unless you are running a Java app on that same server).
 
Consider Paul's rocket mass heater.
 
subject: what kind JDBC driver do I need ?
 
Similar Threads
Problem in making connection
Can I use a JDBC driver installed on another PC ?
help in JDBC
Java program on Solaris runs slow when connecting to database on same system
JDBC - How to find Oracle Driver Version