Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

connector

 
sam liya
Ranch Hand
Posts: 1240
  • 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?
 
Scott Selikoff
author
Saloon Keeper
Posts: 4028
18
Eclipse IDE Flex Google Web Toolkit
  • 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.
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring 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 .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic