aspose file tools*
The moose likes JDBC and the fly likes connector Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "connector" Watch "connector" New topic
Author

connector

sam liya
Ranch Hand

Joined: Nov 25, 2008
Posts: 1122
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
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3704
    
    5

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.


My Blog: Down Home Country Coding with Scott Selikoff
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

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 agree. Here's the link: http://aspose.com/file-tools
 
subject: connector