Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what kind JDBC driver do I need ?

 
Steve Yu
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic