Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

jbbc - sql

 
karai baskar
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
helo friends,
i want to know the driver path to connect with sql database
using jdbc.let me know both the dsn and dsnless connection
driver path.is any special driver classes i need?
do i have to set any classpath for that.
please help me in this
thank you for all
baskar
 
David Freels
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To use an existing ODBC connection, you need to use the jdbc-odbc bridge included in Sun's jdk. To use JDBC to connect to a database, you will need to find a JDBC driver for that db. Oracle, Informix, Interbase and DB2 all have JDBC drivers available. They also will have documentation on how to use the driver.
Here is a tutorial from Sun on basic JDBC:
http://java.sun.com/docs/books/tutorial/jdbc/basics/index.html
Here is Sun's JDBC documentation page:
http://java.sun.com/j2se/1.3/docs/guide/jdbc/index.html
Each vendor should provide documentation for their driver because the names of classes are different.
Hope this helps.
David
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!