File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Type 4 JDBC Driver for MS_Access Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Type 4 JDBC Driver for MS_Access" Watch "Type 4 JDBC Driver for MS_Access" New topic
Author

Type 4 JDBC Driver for MS_Access

prantik bordoloi
Greenhorn

Joined: Jun 12, 2001
Posts: 5
Can anybody tell me where i can find a JDBC1.0 compliant type4 driver for MS-Access. And Please i want a free driver.
Ming_chen
Greenhorn

Joined: Aug 14, 2001
Posts: 2
I don't know what is type 4 JDBC, but as I know using JDBC to connect MS_Access is very easy and simple.
Step 1: create or select a DSN for MS_Access Driver (through ODBC Data Source Administrator).
Step 2: make connection in you java program, set String url = "jdbc dbc:yourDSN";
Step 3: in the try block, call Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); then you got the driver
Step 4: in Connection try block: Connection conn = DriverManager.getConnection(url, userName, passWord); you can set userName and passWord to empty string " ", because Access does not require these.
Step 5: create your Statement stmt = conn.createStatement().. then you're on the way.
Kareem Gad
Ranch Hand

Joined: Aug 06, 2001
Posts: 89
Prantik ,
http://industry.java.sun.com/products/jdbc/drivers/search-results/1,2722,,00.html
check out this site and you'll find a list of JDBC driver vendors. they are for free.


------------------
KaReEm


<b><i>KaReEm</i><br /><ul type="square"><li>SCJP-Free Range Web Developer <br /></ul></b>
Stanley Tan
Ranch Hand

Joined: May 17, 2001
Posts: 243
Are you sure they are for free?
Jeff Hancock
Greenhorn

Joined: Nov 17, 2000
Posts: 11
From what i have read, JDBC DBC bridge to Access can only be accomplished with a type 1 driver.
Jeff Hancock
Greenhorn

Joined: Nov 17, 2000
Posts: 11
And even that does not work. Even with ODBC connections to the database setup (SYSTEM, USER and FILE), all fail with Data Source not found and no default driver specified.
I don't believe there is a way to connect to MS Access from Java.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Originally posted by Jeff Hancock:
And even that does not work. Even with ODBC connections to the database setup (SYSTEM, USER and FILE), all fail with Data Source not found and no default driver specified.
I don't believe there is a way to connect to MS Access from Java.

You're crazy. It can be done.


GenRocket - Experts at Building Test Data
Paul Misoni
Greenhorn

Joined: Jan 02, 2001
Posts: 16
Jeff,
You should pay attention to Gregg's tag line.
Ignorance can usually be cured. That's one reason that we have forums.
If you search the history for the JDBC forum you may find one or two entries that indicate that you actually can connect to MS Access from Java.

Please excuse the sarcastic overtones of my post...I can't seem to contain myself.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Originally posted by Paul Misoni:
Please excuse the sarcastic overtones of my post...I can't seem to contain myself.

Yep, you're a bad person.
Lucky there's room for two of us.
Richa Pandharikar
Greenhorn

Joined: Feb 19, 2003
Posts: 1
As far I know I think there is no type 4 driver for Ms Access. Am I correct ?
I too am looking for it.
Any help will be appreciated ...
Thanks
Cheers !
Richa
Larry UpNorth
Greenhorn

Joined: Aug 31, 2002
Posts: 4
I am running on Windows-95 with JDK 1.3 connecting to an Access-97 db with no problems.
Just follow the steps listed in the response by Ming Chen. I did not need to install any special driver.
Hope this helps.
Dean Reedy
Ranch Hand

Joined: Sep 10, 2001
Posts: 89
Windows 95, Java 1.3, MS Access 97 example connection method. Note: Not Type IV driver but it works.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Type 4 JDBC Driver for MS_Access