aspose file tools
The moose likes JDBC and the fly likes connector Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "connector" Watch "connector" New topic
Author

connector

sameera liyanage
Ranch Hand

Joined: Nov 25, 2008
Posts: 692
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: 3673
    
    2

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: 2896
    
    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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: connector
 
Similar Threads
lookAnd Feel jar not working .Help required Urgent
JAR
Unable to load lookAnd feel Jar for my java application
ClassNotFoundException
JSP and MySQL and issues