Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

connector

 
Ranch Hand
Posts: 1325
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when we use jdbc to connect DATABASE we have to add mysqlconnector.jar to the project.
1) but when we usin odbc we don't need to add any jar files.why?
2) in first case what is the job of the mysqlconnector.jar .is it act as a Driver or else?
 
author
Posts: 4173
29
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is a driver. Every database has a different driver and none of them are built into Java by default, therefore you need a database-specific driver for each type of database you want to use.
 
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

aruna sameera wrote:
1) but when we usin odbc we don't need to add any jar files.why?


ODBC connection handled by the OS specific files (for Windows, its DLL and DSN services), which, in turn talks with the respective databases registered with it.
JDBC works same but the drivers are incorporated into Java code (Driver, .jar files), which in turn talks with the database. Its all lies in which type of Driver you are using .
 
I claim this furniture in the name of The Ottoman Empire! You can keep this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic