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 jdbc -access Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "jdbc -access" Watch "jdbc -access" New topic
Author

jdbc -access

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
hi
I'm using access as database.when we use SQL as database we write import java.sql.*;
but when we use access what are the library functions which we have to import?Can anyone provide me with the code to access Access database.
John Bateman
Ranch Hand

Joined: Mar 09, 2000
Posts: 320
The code is the same, you just may need another driver. Like the JDBC/ODBC bridge driver.
Hope this helps.

SOURCE CODE should be SURROUNDED by "code" tags.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

I'm assuming you're running on a windows machine, first you have to set up your access file to use the odbc drivers (cos access is a file, not an RDBMS)
Go to the control panel, odbc data sources, user dsn tab, add, select *.mdb, finish.
Give the file a name, in the database section browse and select your database.
Once you've done this you should be able to go...

Dave.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

I promised myslef I'd never forget to turn smilies off when writing jdbcdbc.
Looks like I failed.

Dave
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jdbc -access